file-ziper-and-uploader
v2.6.18
Published
Readme
File-Ziper-And-Uploader
Webpack Uploader Plugin. Sending filterd files generated by webpack to service.
install:
npm i file-ziper-and-uploader -Ddocument:
Add plugin to your webpack.config.js. Using code below to send a zip package to target service when webpack has generrated assests(js, image, css, etc.).
const { FileZiperAndUploader } = require('file-ziper-and-uploader');
...
plugins: [
new FileZiperAndUploader([
//task one : ziping all files and sending them to localhost:8081
{
url: 'localhost:8081', //* your target address service to receive zip
token: '',// your service auth string decided by your service code.
zipName: 'puppy.zip', // zip name
target: 'all' // regular expression or 'all' to filter files to zip
},
//task two: just ziping files with suffix .min.js and sending them to localhost:8082
{
url: 'http://localhost:8082'
token: '',
zipName: 'monitor.min.zip',
target: /\.min\.js$/
}
])
],Default value will be added to every task if not specified.
url: 'http://localhost:8080/upload',
zipName: 'source-map.zip',
target: /\.map$/This package can be used for sourcemap files transfering or test enviroment auto deploing. You can contact [email protected] when you have problems.
