1.0.0 • Published 5 years ago

upyun-webpack-plugin v1.0.0

Weekly downloads
9
License
Anti 996
Repository
github
Last release
5 years ago

npm license

  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>'
    }),
  ]
}

upyun js sdk

upyun-js