npm.io
1.0.0 • Published 7 years ago

upyun-webpack-plugin

Licence
Anti 996
Version
1.0.0
Deps
1
Size
9 kB
Vulns
0
Weekly
0

npm license

Upyun Webpack Plugin

A webpack plugin of upyun

Install

  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.

Usage

Upyun upload plugin

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

Upyun download plugin

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

Upyun remove file(s) plugin

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

Related

upyun js sdk

upyun-js

Keywords