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

storybook-qiniu-webpack-plugin

v0.0.8

Published

支持将 StoryBook 的 Bundle 文件 上传至七牛CDN

Downloads

22

Readme

Storybook Qiniu CDN

改造自 better-qiniu-webpack-plugin,支持将 StoryBook 的 Bundle 文件 上传至七牛CDN

功能

  • 支持并行上传
  • 保留上一版本文件
  • 智能分析,不重复上传

安装

yarn add storybook-qiniu-webpack-plugin --dev

使用

.storybook/main.js

const StorybookQiniuWebpackPlugin = require('storybook-qiniu-webpack-plugin');

module.exports = {
  webpackFinal: async (config, { configType }) => {
    config.plugins.push(new StorybookQiniuWebpackPlugin({
      accessKey: '', // required
      secretKey: '', // required
      bucket: '', // required
      bucketDomain: '', // required
      matchFiles: ['!*.html', '!*.map'],
      uploadPath: '/',
      usePublicPath: true,
      batch: 10,
      deltaUpdate: true
    }))
  }
}

在项目目录下新建 .qiniu_webpack 文件,并且在 .gitignore 忽略此文件

.qiniu_webpack

module.exports = {
  accessKey: 'qiniu access key', // required
  secretKey: 'qiniu secret key', // required
  bucket: 'demo', // required
  bucketDomain: 'https://domain.bkt.clouddn.com', // required
  matchFiles: ['!*.html', '!*.map'],
  uploadPath: '/assets',
  usePublicPath: true,
  batch: 10,
  deltaUpdate: true
}

Options

|Name|Type|Default|Required|Description| |:--:|:--:|:-----:|:-----:|:----------| |accessKey|{String}| | true |七牛 Access Key| |secretKey|{String}| | true |七牛 Secret Key| |bucket|{String}| | true |七牛 空间名| |bucketDomain|{String}| | true |七牛 空间域名| |matchFiles|{Array[string]}| ['*'] | false |匹配文件/文件夹,支持 include/exclude| |uploadPath|{string}| /webpack_assets | false |上传文件夹名| |usePublicPath|{Boolean}| true | false |默认会使用 bucketDomain + uploadPath,来设置 webpack publicPath| |batch|{number}| 10 | false |同时上传文件数| |deltaUpdate|{Boolean}| true | false |是否增量构建|

  • bucketDomain 支持不携带通信协议: //domain.bkt.clouddn.com
  • matchFiles 匹配相关文件或文件夹,详细使用请看: micromatch
    • !*.html 不上传文件后缀为 html 的文件
    • !assets/**.map 不上传 assets 文件夹下文件后缀为 map 的文件

License

Copyright ©, zzetao. Released under the MIT License.