gulp-oss-up是一个用于上传静态文件到阿里云OSS的gulp插件。要安装此插件,请使用以下命令:npm install gulp-oss-up --save-dev
。
使用示例代码如下:
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 target directory in the bucket
}));
});
暂无评论