Skip to content

TerenYeung/upyun-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A webpack plugin of upyun

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published