gulp-upyun
3 gulp plugins for UPYun service.
Install via npm:
npm install gulp-upyun --save-dev
Example
Download
var gulp =var upyunSrc = upyunSrcvar options =username: 'username'passeord: 'password'gulp
Options we supported:
- username: your username access to yoyun bucket
- username: password of your username
- read: default: true. Setting this to false will return file.contents as null and not read the file at all.
- buffer: default: true. Setting this to false will return file.contents as a stream and not buffer files.
Negative globs could be omited.
gulp
Upload
var gulp =var upyunDest = upyunDestvar options =username: 'username'password: 'password'var folderOnUpyun = '/yourbucket/dist'gulp
Options we supported:
- md5: default: true. Verify the checksum of file on upyun.
Delete folder or file on upyun
var upyunRimraf = upyunRimrafvar options =username: 'username'password: 'password'// delete a folder// delete a file
upyunRimraf
will delete the folder recursively.
upyunRimraf could be a writable stream
var gulp =var upyunSrc = upyunSrcvar upyunRimraf = upyunRimrafvar options =username: 'username'password: 'password'gulp
Build
Default gulp
task will compile all of CoffeeScript codes in ./src
to JS in ./lib
.
Test
Before you run npm test
, you have to put your credential.js
into ./test
.
moduleexports =username: 'username'password: 'password'
Then run npm test
.