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

upload-ali-oss-plugin

v1.0.1

Published

a webpack plugin of upload file to ali-oss

Downloads

2

Readme

upload-ali-oss-plugin

A webpack plugin to upload assets to aliyun oss

一个上传文件到 阿里云osswebpack 插件。

使用

  1. 安装包
$ npm install upload-ali-oss-plugin -D
or
$ yarn add upload-ali-oss-plugin -D
  1. 在 config 文件中引入,添加到 plugins
const AliOssPlugin = require('upload-ali-oss-plugin')

// webpack config, oss 配置
const { OSS } = require('./oss')

new AliOssPlugin({
  region: OSS.REGION,
  accessKeyId: OSS.ACCESS_KEY_ID,
  accessKeySecret: OSS.ACCESS_KEY_SECRET,
  bucket: OSS.BUCKET,
  ossPath: OSS.PREFIX,
})

// oss.js,记得添加到 .gitignore,不要暴露到外网
module.exports = {
  OSS: {
    ACCESS_KEY_ID: 'your key',
    ACCESS_KEY_SECRET: 'your secret',
    BUCKET: 'your bucket',
    REGION: 'oss-cn-shenzhen',
    PREFIX: '要上传到的 oss 目录',
  },
}

options 说明

| 参数 | 说明 | 类型 | 默认值 | 是否必填 | | :-------------: | :----------------------: | :-----: | :--------------------: | :------: | | region | 阿里云上传区域 | String | oss-cn-hangzhou | | | accessKeyId | 阿里云的 accessKeyId | String | - | 是 | | accessKeySecret | 阿里云的 accessKeySecret | String | - | 是 | | bucket | 上传到哪个 bucket | String | - | 是 | | debug | 调试开关 | Boolean | false | | | ossPath | 上传到 bucket 的哪个目录 | String | ''(不传则默认根目录) | | | patterns | 需要上传的文件规则 | Array | | | | verbose | 是否展示详细日志 | Boolean | true | | | timeout | 上传超时时间 | Number | 60(单位秒) | | | overwrite | 是否覆盖同名文件 | Boolean | false | |