Skip to content

marshalYuan/gulp-oss-up

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-oss-up

A gulp plugin for uploading static file to aliyun oss.

##install npm install gulp-oss-up --save-dev

##usage

var gulp = require('gulp');
var up = require('gulp-oss-up');
gulp.task('test', function() {
	return gulp.src("./app.js")
		.pipe(up({
			"accessKeyId": "your accessKeyId",
			"accessKeySecret": "your accessKeySecret", 
			"bucket": "bucket", //your bucket name
			"objectDir": "dir" //your targer directory in the bucket(optional)
		}));
});

This config will upload your current directory file index.html to dir/index.html in your bucket. ##optional param

####objectDir default: ""; //root directory ####objectGen default

function(dest, src){
	return [dest, src].join('\/')
}

dest is obejctDir; src is the file path relative to cwd path ##test touch testConfig.json and edit your testConfig file

run mocha test.js

About

A gulp plugin for uploading static file to aliyun oss.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published