gulp-oss-up

0.1.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i gulp-oss-up

Weekly Downloads

0

Version

0.1.1

License

MIT

Last publish

Collaborators

  • marshalyuan