npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gulp-qiniu-utils

v2.0.4

Published

七牛gulp插件,封装了上传,删除,预取,刷新等功能 gulp-qiniu-utils, such as upload, remove, prefetch, refresh and so on

Downloads

48

Readme

七牛gulp插件,封装了上传,删除,预取,刷新等功能

Install:

Install with npm or cnpm

npm install --save-dev gulp-qiniu-utils
cnpm install --save-dev gulp-qiniu-utils

Usage:


var gulp = require('gulp')
var Qiniu = require('gulp-qiniu-utils')

var qiniuOptions = {
  ak: 'your accessKey',
  sk: 'your secretKey',
  zone: 'Zone_z2',//空间对应存储区域(华东:z0,华北:z1,华南:z2,北美:na0)
  bucket: '...',//七牛对应空间
  upload: {
    dir: './public/dist',//上传本地目录
    prefix: 'test/',//上传时添加的前缀,可省略
    except: /\.(html|js)$/ //上传时不上传文件的正则匹配
  },
  remote: {
    url: 'http...',//七牛空间域名
    prefix: {
      default: 'test/',//七牛空间默认前缀,如果下面三个相同可省略
      remove: 'test/',//七牛空间删除前缀
      prefetch: 'test/',//七牛空间预取前缀
      refresh: 'test/'//七牛空间刷新前缀
    }
  }
}

gulp.task('upload', function (cb) {
  var qiniu = new Qiniu(qiniuOptions)
  qiniu.remove()
    .then(r => qiniu.upload().then(files=>console.log(files))) //根据自己的需求来调用相应的方法
    .then(r => qiniu.refresh())
    .then(r => qiniu.prefetch())
    .then(r => cb())
})

PS:有什么问题或者建议可以在github上面提,觉得好用的话可以点个star