upyun-webpack-plugin
v1.0.0
Published
a webpack plugin of upyun
Downloads
3
Readme
npm i --save-dev upyun-webpack-plugin
This is a webpack plugin that integrates upyun-js into webpack, which can implement automatic workflow for upyun file handling.
const
{UpyunUploadPlugin} = require('upyun-webpack-plugin');
module.exports = {
entry: 'index.js',
output: {
path: __dirname + '/dist',
filename: 'index_bundle.js'
},
plugins: [
new UpyunUploadPlugin({
serviceName: '<upyun service>',
operatorName: '<upyun operatorname>',
operatorPassword: '<upyun password>',
remotePath: '<remote folder>',
localPath: '<local folder or file>'
}),
]
}
const
{UpyunDownloadPlugin} = require('upyun-webpack-plugin');
module.exports = {
entry: 'index.js',
output: {
path: __dirname + '/dist',
filename: 'index_bundle.js'
},
plugins: [
new UpyunDownloadPlugin({
serviceName: '<upyun service>',
operatorName: '<upyun operatorname>',
operatorPassword: '<upyun password>',
remotePath: '<remote folder>',
localPath: '<local folder or file>'
}),
]
}
const
{UpyunRmPlugin} = require('upyun-webpack-plugin');
module.exports = {
entry: 'index.js',
output: {
path: __dirname + '/dist',
filename: 'index_bundle.js'
},
plugins: [
new UpyunRmPlugin({
serviceName: '<upyun service>',
operatorName: '<upyun operatorname>',
operatorPassword: '<upyun password>',
remotePath: '<remote folder>',
localPath: '<local folder or file>'
}),
]
}