grunt-alibabacloud-oss
v1.0.2
Published
File uploader for Alibaba Cloud (Aliyun) OSS.
Downloads
1
Maintainers
Readme
grunt-alibabacloud-oss
File uploader for Alibaba Cloud (Aliyun) OSS. Grunt wrapper for ali-oss.
Getting Started
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-alibabacloud-oss --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-alibabacloud-oss');
Upload task
Run this task with the grunt alibabacloud_oss
command.
Task targets, files and options may be specified according to the grunt Configuring tasks guide.
Options
- accessKeyId {String} access key you create on aliyun console website
- accessKeySecret {String} access secret you create
- [bucket] {String} the default bucket you want to access
If you don't have any bucket, please use
putBucket()
create one first. - [endpoint] {String} oss region domain. It takes priority over
region
. - [region] {String} the bucket data region location, please see Data Regions,
default is
oss-cn-hangzhou
. - [internal] {Boolean} access OSS with aliyun internal network or not, default is
false
. If your servers are running on aliyun too, you can settrue
to save lot of money. - [secure] {Boolean} instruct OSS client to use HTTPS (secure: true) or HTTP (secure: false) protocol.
- [timeout] {String|Number} instance level timeout for all operations, default is
60s
Usage Examples
{ "alibabacloud_oss": {
"options": {
"bucket": "my-awesome-bucket",
"region": "oss-cn-shanghai",
"accessKeyId": "XXXXXXXXXXXXX",
"accessKeySecret": "XXXXXXXXXXX"
},
"main": {
"files": [
{
"expand": true,
"cwd": "deploy",
"src": ["**/*"],
"dest": "/"
}
]
}
}