2.0.2 • Published 3 years ago

uploadcdn v2.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
3 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

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago