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

webpack-plugin-qiniu-upload

v2.0.7

Published

Vue3,webpack-plugin-qiniu-upload for qiniu(七牛)|aws(亚马逊) cloud upload. support @vue/cli-service 5.0.x

Downloads

24

Readme

☁️ Support the latest SDK Qiniu Cloud upload, adapted to the latest VUE scaffolding CLI4.0 and 5.0 versions

💪 Suitable for the latest vue scaffolding cli4.0 and 5.0 versions, support webpack5 configuration

💪 Webpack5 configuration is supported

🚀 Incremental file upload is supported, eliminating the annoyance and waiting time of repeatedly uploading and refreshing files for all resources

  pnpm add webpack-plugin-qiniu-upload -D
  yarn add webpack-plugin-qiniu-upload -D

vue.config.js

const UploadQiNiuPlugin = require("webpack-plugin-thirdparty-upload");
const isBuildDev = process.env.buildMode === 'dev'

module.exports = {
  ...,
  plugins: [
    uploadPlugin({
        sdkName: isBuildDev ? 'qiniu' : 'aws',
        accessKey: isBuildDev ? process.env.QN_ACCESS_KEY : process.env.AWS_ACCESS_KEY,
        secretKey: isBuildDev ? process.env.QN_SECRET_KEY : process.env.AWS_SECRET_KEY,
        bucket: isBuildDev ? process.env.QN_BUCKET : process.env.AWS_BUCKET,
        region: isBuildDev ? 'Zone_z2' : 'us-east-1',
        awsDistributionId: 'xxxx', // aws的失效id
        enabledRefresh: true,
        publicPath: process.env.logBaseUrl,
        uploadTarget: path.resolve(__dirname, './dist'),
        appName: webpackEntry.EntryConfigs[argv.e].filename.replaceAll('.html', ''),
        fileLogPath: 'log/',
        env: isBuildDev ? 'development' : 'production',
        htmlPath: htmlPath, // html 存到云的路径
        excludeHtml: false, // 是否排除html文件
        // suffix: '-v1'
    })
  ],
};

qiniu cloud Options

| Name | Type | Default | Description | | :------------------------: | :---------: | :----------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------ | | qiniuAccessKey | {String} | null | Your Qiniu AccessKey | | qiniuSecretKey | {String} | null | Your Qiniu SecretKey | | qiniuBucket | {String} | null | Your Qiniu Bucket Name | | qiniuZone | {String} | null | Your Qiniu zone code | | enabledRefresh | {Boolean} | false | Is enable refresh the file on Qiniu Clound after file upload | | excludeHtml | {Boolean} | true | Is exclude html file | | onlyRefreshHtml | {Boolean} | false | only refresh html file (eg: _/demo/index.html + _/demo/), throws an exception in the case of a failure. | | prefixPath | {String} | - | prefix path for the file | | fileLogPath | {String} | log/ | Provide a directory where log file should be stored | | publicPath | {String} | webpackConfig.output.publicPath | The prefix path to your packaged resource | | uploadTarget | {String} | webpackConfig.output.path | Directory of the folder to be uploaded | | appName | {Number} | Date.now() | Optional. Name of the file used to generate resource mapping file logs | | env | {String} | development | The environment directory corresponding to the JSON file of log |

About qiniuZone:

TODO LIST

  • [x] Supports incremental update file upload
  • [x] Supports environment With log json file
  • [ ] Support log file cleaning or pull range filtering