gulp-alioss
v0.1.3
Published
A plugin for Gulp that uploads files to Aliyun OSS
Downloads
60
Readme
gulp-oss
Aliyun Oss Client for Gulp
Install
npm install gulp-alioss
DEMO
var gulp = require('gulp');
var oss = require('gulp-alioss');
gulp.task('oss', function(){
var options = {
accessKeyId: '********',
secretAccessKey: '*********',
endpoint: 'http://oss-cn-***.aliyuncs.com',
apiVersion: '2013-10-15',
prefix: 'assets/js', //for no prefix: prefix: ''
bucket: 'test'
};
//./js/a.js -> <prefix>/a.js
// ......
//./js/b/a.js -> <prefix>/b/a.js
return gulp.src(['./js/**/*']).pipe(oss(options));
});
操作结果
cd /path/to/gulpfile.js/
gulp oss
[14:50:59] Using gulpfile ~/path/to/gulpfile.js
[14:50:59] Starting 'oss'...
[14:50:59] Finished 'oss' after *** ms
[14:50:59] OK: assets/a.js
[14:50:59] OK: assets/b/a.js
....