Skip to content

jqnote/gulp-alioss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-oss

Aliyun Oss Client for Gulp

v1.0.1

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
....

About

A plugin for Gulp that uploads files to Aliyun OSS

Resources

License

Stars

Watchers

Forks

Packages

No packages published