gulp-up-cdn
v1.0.0
Published
A Upload Gulp pipes (Qiniu Cloud, Ali Cloud OSS)
Downloads
2
Maintainers
Readme
gulp-up-cdn
概述 Summary
此包作为gulp-up-qiniu-cdn的更新版本,在七牛云的基础上增加了阿里云oss。
As an updated version of gulp-up-qiniu-cdn
, this package adds Ali Cloud OSS on the basis of Qiniuyun。
该工具允许你通过Gulp管道将文件上传到七牛云或阿里云OSS对象存储。
This tool allows you to upload files to qiniu or Ali Cloud OSS object storage through Gulp channels.
用法 Usage
上传
const cdn = require('gulp-up-cdn')
// Qiniu Cloud
gulp.task('taskname', function(){
return gulp.src('filePath').pipe(cdn('qn', {
accessKey: '',
secretKey: '',
bucket: 'bucket-name',
// 非必填,用于log输出全路径
// This parameter is optional. Log output full path
prefix: "https://xxx"
}, 'folderPath/fileName.suffix'))
});
// Ali Cloud OSS
gulp.task('taskname', function(){
return gulp.src('filePath').pipe(cdn('oss', {
accessKeyId: '',
accessKeySecret: '',
bucket: 'bucket-name',
region: 'oss-xxx',
// 非必填,用于log输出全路径
// This parameter is optional. Log output full path
prefix: 'https://xxx'
}, 'folderPath/fileName.suffix'))
});