2.0.2 • Published 4 years ago

uploadcdn v2.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

内部将文件批量上传至cdn

使用

安装

npm i uploadcdn --save-dev

webpack导入

const uploadcdn = require('uploadcdn');

const getTimePrefix = require('uploadcdn').getTimePrefix;
// 获取CDN前缀
const publicPath = getTimePrefix();
...
publicPath: 'https://cdn.com/' + publicPath,
plugins: [
  // 注意需要上传form的格式是file
  new uploadcdn.Upload2cdnPlugin({cdnUrl: 'https://qiniu.com'})
]

单独引入

const uploadCDN = require('uploadcdn').uploadCDN;
// cdnUrl,cdn的上传链接,相对路径的filelist文件列表,dirname文件目录
uploadCDN(cdnUrl, filelist, dirname)
2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago