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

@zbyfe/sourcemap_upload_aliyunoss_webpack_plugin

v0.0.4

Published

sourceMap 文件上传到阿里云oss

Downloads

8

Readme

sourcemap_upload_aliyunoss_webpack_plugin

webpack(>=2)插件,上传 js 和 js.map 文件到阿里云 oss

Installation

Using npm:

$ npm install @zbyfe/sourcemap_upload_aliyunoss_webpack_plugin --save-dev

Using yarn:

$ yarn add @zbyfe/sourcemap_upload_aliyunoss_webpack_plugin --save-dev

Usage

  1. webpack usage
const SourceMapPlugin = require('@zbyfe/sourcemap_upload_aliyunoss_webpack_plugin');

const config = {
  plugins: [
    devtool:'source-map'
    new SourceMapPlugin({
      host: 'https://xxx.com',
      region: 'xxx-xxx-xxx',
      accessKeyId: 'xxxxxxx',
      accessKeySecret: 'xxxxxx',
      bucket: 'xxxxxx',
      version: '1.0.2',
      project: 'xxx',

      env: 'test',
      timeout: 30000,
      test: false,
      include: ['.js', '.js.map'],
      ignore: ['node_modules'],
      deleteSourceMap: true,
      buildDirectory: 'dist'
    }),
  ],
};
  1. vue usage
const SourcemapPlugin = require("@zbyfe/sourcemap_upload_aliyunoss_webpack_plugin");

module.exports = {
  productionSourceMap: true,
  configureWebpack: (config) => {
    if (process.env.NODE_ENV === "production") {
      config.plugins.push(
        (host: "https://xxx.com"),
        (region: "xxx-xxx-xxx"),
        (accessKeyId: "xxxxxxx"),
        (accessKeySecret: "xxxxxx"),
        (bucket: "xxxxxx"),
        (version: "1.0.2"),
        (project: "xxx"),
        (env: "test"),
        (timeout: 30000),
        (test: false),
        (include: [".js", ".js.map"]),
        (ignore: ["node_modules"]),
        (deleteSourceMap: true),
        (buildDirectory: "dist")
      );
    }
  },
};
  1. Params

| Option | Type | Required | Description | | :-------------: | :----------: | :------: | :---------------------------------------------------------------------------------: | | host | string | required | cdn 域名 | | dist | string | required | 上传到 oss 哪个目录下,默认为 oss 根目录。可作为路径前缀使用 | | region | string | required | 阿里云上传区域 | | accessKeyId | string | required | 阿里云的授权 accessKeyId | | accessKeySecret | string | required | 阿里云的授权 accessKeySecret | | bucket | string | required | 上传到哪个 bucket | | version | string | required | 当前项目版本 | | project | string | required | 当前项目名称 | | env | string | optional | 当前环境,要包含 onlineprodpretestdev字符串,默认值为production | | timeout | number | optional | oss 超时设置,默认为 30 秒(30000) | | test | boolean | optional | 测试,仅显示要上传的文件,但是不执行上传操作。默认 false | | include | array/string | optional | 上传文件类型,默认值['.js', '.js.map'] | | ignore | array/string | optional | 忽略上传的文件夹,默认值['node_modules'] | | deleteSourceMap | Boolean | optional | 上传完成后是否删除 sourcemap 文件,默认值 true | | buildDirectory | String | optional | 打包指定生成的目录,e.g. builddist |