🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

qiniu-upload-plugin

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qiniu-upload-plugin

上传 Webpack 打包出来的 assets 到 七牛云。

latest
Source
npmnpm
Version
1.2.9
Version published
Maintainers
1
Created
Source

qiniu-upload-plugin

npm 版本 下载量 Build Status Build status Coverage Status Greenkeeper badge David

将 webpack 打包出来的 assets 上传到七牛云。

特点

  • 上传 webpack 打包后的所有静态资源到七牛云。
  • 自动忽略.html文件。
  • 支持覆盖已上传文件。

基于官方七牛云Node.js SDK

安装

npm install qiniu-upload-plugin --save-dev

使用方法

const QiniuUploadPlugin = require('./QiniuUploadPlugin');

plugins: [
  new QiniuUploadPlugin({
    publicPath: 'http://cdn.xxx.com', // 七牛云域名,自动替换 publicPath
    accessKey: 'your qiniu accessKey', // 个人中心,秘钥管理,AK
    secretKey: 'your qiniu secretKey', // 个人中心,秘钥管理,SK
    bucket: 'your qiniu bucket', // 存储空间名称
    zone: 'Zone_z2', // 存储地区
    // 可选参数:
    cover: false // 慎用!默认为 false,设置为 true 会覆盖掉已经保存在七牛云上的同名文件。
  })
];

效果截图

上传七牛云

示例项目

Keywords

qiniu

FAQs

Package last updated on 02 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts