1.0.4 • Published 7 years ago

k-qiniu v1.0.4

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

K-Qiniu

After the packaged webpack file upload to seven Qiniu

Install

npm:

  npm install  --save k-qiniu

Use

  1. Set webpack
  var QiniuPlugin = reqiure('k-qiniu');
    

  // Webpack 配置文件
  module.exports = {
    plugins: [
      new QiniuPlugin({

          // 七牛云的两对密匙 Access Key & Secret Key
          accessKey: 'accessKey',
        
          secretKey: 'secretKey',
        
          // 七牛云存储空间名称
          bucket: 'test',
          
          // 上传到七牛后保存的文件名
          // name is package.json name
          //version is package.json version
          //asset is file name
          path: 'static/[name]/[version]/[asset]'

        })
      // ...
    ]
    // ...
  };
  1. Set publicPath

publish

var package = require('./package')
const publicPath = 'http://publish.404mzk.com/static/' + package.name + "/" + package.version +"/"

module.exports = {
  ...
   output: {
    
    publicPath: publicPath,

  },
}
1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago