qiniuu-webpack-plugin
A webpack qiniu cdn plugin, Simplifies uploade your front to Qiniu and refresh cache
Last updated 3 years ago by alexec .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install qiniuu-webpack-plugin 
SYNC missed versions from official npm registry.

qiniu-webpack-plugin

npm version

Documentation

npm

npm install qiniuu-webpack-plugin --save-dev

yarn

yarn add qiniuu-webpack-plugin

append to webpack.conf.js

if (config.build.deployToQiniu) {
  var QiniuWebpackPlugin = require('qiniuu-webpack-plugin')
  var qiniuPlugin = new QiniuWebpackPlugin({
    ACCESS_KEY: '-FpCM8XR5JvLeXULWp',
    SECRET_KEY: '-5ZHX',
    bucket: 'ber-',
    zone:'Zone_z2',
    domain: 'http://www.google.com/'
  })

  webpackConfig.plugins.push(qiniuPlugin)
}

其中关于Zone对象和机房的关系如下:

机房 Zone对象
华东 Zone_z0
华北 Zone_z1
华南 Zone_z2
北美 Zone_na0

具体见下面的文档

append to config.js

deployToQiniu: process.argv && process.argv[2] === 'deploy'

append to package.json scripts

"deploy": "node build/build.js deploy",
npm run deploy
or
yarn run deploy

Contribution

If you find a bug or want to contribute to the code or documentation, you can help by submitting an issue or a pull request.

License

The MIT License(http://opensource.org/licenses/MIT)

Copyright (c) 2017-present, alex xalexec@gmail.com

Current Tags

  • 0.0.5                                ...           latest (3 years ago)

5 Versions

  • 0.0.5                                ...           3 years ago
  • 0.0.4                                ...           3 years ago
  • 0.0.3                                ...           3 years ago
  • 0.0.2                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 5
Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |