Skip to content

firesh/gulp-aliyun-oss-upload

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A plugin for Gulp that upload web app to Aliyun OSS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%