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

qiniu-qupload

v1.0.6

Published

依赖qshell的七牛云同步插件,配合gulp和webpack,可实现自动打包并上传html到服务器,其它静态资源到七牛cdn

Downloads

16

Readme

准备

本插件依赖于七牛的命令行工具qshell和shelljs,之所以依赖qshell是为了方便维护,以免由于官方调整而改动代码

qshell官方安装教程

安装

npm install qiniu-qupload

使用

完整配置可以参考qshell的文档;本插件同步前会自动先删除七牛云对应bucket下的key_prefix开头的文件,然后上传,所以不用担心历史文件占用七牛空间的问题;七牛缓存比较严重,建议给文件都加指纹哦,插件有其他问题,可以直接在git提问;个人建议把key_prefix设置为你项目的名称,我是直接把package.json的name字段直接引入进来了,例如这样`${process.env.npm_package_name}/static/`,同时,如果你使用了webpack,把publicPath字段改为`http://youCdnPath/${process.env.npm_package_name}/`即可,这样一来,每次项目初始化之后改下package.json的name字段,然后配合npm scripts就能实现一个命令搞定打包+同步cdn+上传服务器

const qiniuUploader = require('qiniu-qupload')
const path = require('path')
const qnConf = {
  "ak"            : "youAK",
  "sk"            : "youSK",
  "src_dir"       : `${path.resolve(process.cwd(), './test').replace(/\\/g, '\\')}`,
  "bucket"        : "youBucket",
  "key_prefix"    : "11test/static/",
  "overwrite"     : true,
  "rescan_local"  : true,
  "log_file"      : "qnupload.log",
  "file_type"     : 0
}
qiniuUploader(qnConf)

注意:src_dir参数mac和windows不一样,上面的为windows平台的示例,mac应该为path.resolve(process.cwd(), './test')但是我没验证,src_dir参数以及其他完整配置请查看qshell-qupload官方文档