New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

gulp-oss-upload

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-oss-upload

A gulp plugin for uploading static file to aliyun oss(by official ali-oss sdk).

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

gulp-oss-upload

A gulp plugin for uploading static file to aliyun oss(by official ali-oss sdk).

上传文件到阿里云 OSS 的 gulp 插件.

install

npm install gulp-oss-upload --save-dev

usage

var gulp = require('gulp');
var ossUpload = require('gulp-oss-upload');

gulp.task('publish-oss', function() {
	return gulp.src("./app.js")
		       .pipe(ossUpload({
                    accessKeyId: 'your accessKeyId',
                    accessKeySecret: 'your accessKeySecret',
                    bucket: 'your bucket name',
                    rootDir: 'v1' // upload file root directory in the bucket(optional)
		        }));
});

This config will upload your current directory file app.js to v1/app.js in your bucket.

optional param

rootDir {string}

default: ''; //root directory

customObjectName {function}

/**
 * custom object name
 * 
 * @param objectName {string} default generate objectName
 * @param rootDir {string} options.rootDir
 * @param fileRelative {string} the file path relative to cwd path
 *
 * @return {string}
 */
function(objectName, rootDir, fileRelative){
	return ''
}

reference

  • gulp-oss-up

    功能完全正常, 满足了我的需求(感谢作者), 但使用过程中发现 OSS SDK 不是阿里云官方的 SDK. objectDir 配置项也有点 bug, 因此自己参考着重写了一个.

Keywords

gulp

FAQs

Package last updated on 15 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts