{"id":20088081,"url":"https://github.com/jacobbubu/gulp-upyun","last_synced_at":"2025-05-06T02:32:42.932Z","repository":{"id":57259372,"uuid":"21408950","full_name":"jacobbubu/gulp-upyun","owner":"jacobbubu","description":"Upyun plug-ins for gulp","archived":false,"fork":false,"pushed_at":"2019-01-22T06:17:21.000Z","size":26,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-06T19:04:56.477Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jacobbubu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-02T02:28:16.000Z","updated_at":"2018-01-18T09:58:52.000Z","dependencies_parsed_at":"2022-08-25T03:53:00.575Z","dependency_job_id":null,"html_url":"https://github.com/jacobbubu/gulp-upyun","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobbubu%2Fgulp-upyun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobbubu%2Fgulp-upyun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobbubu%2Fgulp-upyun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobbubu%2Fgulp-upyun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacobbubu","download_url":"https://codeload.github.com/jacobbubu/gulp-upyun/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224480733,"owners_count":17318310,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T16:11:43.346Z","updated_at":"2024-11-13T16:11:44.807Z","avatar_url":"https://github.com/jacobbubu.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"gulp-upyun\n==============\n\n3 gulp plugins for [UPYun service](https://www.upyun.com/index.html).\n\nInstall via [npm](https://npmjs.org/package/gulp-upyun):\n\n```\nnpm install gulp-upyun --save-dev\n```\n\n## Example ##\n\n### Download ###\n\n``` js\nvar gulp = require('gulp')\nvar upyunSrc = require('gulp-upyun').upyunSrc\n\nvar options = {\n    username: 'username',\n    passeord: 'password'\n}\n\ngulp.task('default', function() {\n    upyunSrc('/yourbucket/dist/**/*', ['!/yourbucket/dist/**/*.png'], options)\n        .pipe(gulp.dest('./out'))\n})\n```\n\nOptions we supported:\n\n* username: your username access to yoyun bucket\n* username: password of your username\n* read: default: true. Setting this to false will return file.contents as null and not read the file at all.\n* buffer: default: true. Setting this to false will return file.contents as a stream and not buffer files.\n\nNegative globs could be omited.\n\n``` js\ngulp.task('default', function() {\n    upyunSrc('/yourbucket/**/*', options\n        .pipe(gulp.dest('./out'))\n})\n```\n\n### Upload ###\n\n``` js\nvar gulp = require('gulp')\nvar upyunDest = require('gulp-upyun').upyunDest\n\nvar options = {\n    username: 'username',\n    password: 'password'\n}\n\nvar folderOnUpyun = '/yourbucket/dist'\n\ngulp.task('default', function() {\n    gulp.src('images/**/*')\n      .pipe(upyunDest(folderOnUpyun, options))\n})\n```\n\nOptions we supported:\n\n* md5: default: true. Verify the checksum of file on upyun.\n\n### Delete folder or file on upyun ###\n\n``` js\nvar upyunRimraf = require('gulp-upyun').upyunRimraf\n\nvar options = {\n    username: 'username',\n    password: 'password'\n}\n\n// delete a folder\nupyunRimraf('/bucket/dist/', options, function(err) {\n    ...\n})\n\n// delete a file\nupyunRimraf('/bucket/dist/rgb.jpg', options, function(err) {\n})\n```\n\n`upyunRimraf` will delete the folder recursively.\n\n### upyunRimraf could be a writable stream ###\n\n``` js\nvar gulp = require('gulp')\nvar upyunSrc = require('gulp-upyun').upyunSrc\nvar upyunRimraf = require('gulp-upyun').upyunRimraf\n\nvar options = {\n    username: 'username',\n    password: 'password'\n}\n\ngulp.task('default', function() {\n    upyunSrc('/yourbucket/dist/**/*', options)\n        .pipe(upyunRimraf(options))\n})\n```\n\n### Build ##\n\nDefault `gulp` task will compile all of CoffeeScript codes in `./src` to JS in `./lib`.\n\n### Test ##\n\nBefore you run `npm test`, you have to put your `credential.js` into `./test`.\n\n``` js\nmodule.exports = {\n    username: 'username',\n    password: 'password'\n}\n```\n\nThen run `npm test`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacobbubu%2Fgulp-upyun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacobbubu%2Fgulp-upyun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacobbubu%2Fgulp-upyun/lists"}