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

wgather-pack-webpack

v0.0.13

Published

该套件应用于由fie init bdf生成的项目,开发者也可以通过修改config配置来适应各种项目适配

Downloads

3

Readme

gather-pack-webpack

该套件应用于由fie init bdf生成的项目,开发者也可以通过修改config配置来适应各种项目适配

安装

无需开发者手动安装,在pack配置设置,gather会自动接管

pack配置

gather.conf.js中对应的packOption,如下都是默认值

{
    dll: false,  //是否启用DllPlugin,会读取package.json中的dependencies
    notdll: [],  //排除dependencies中一些包
    modules: false, //是否启用css module
    happypack: false, //是否启用happypack
    less: false, //是否需要less
    autoInstall : true //是否自动安装依赖
    sass: false, //是否需要sass
    config:{} //见下面的config配置
}

config配置

如下都是默认值

{
  pages: 'src/pages',  //默认搜索入口目录
  pageEntry: 'app.js',  //每一个目录中默认的入口文件
  // entry:{},   //单文件开发的配置
  dest: 'build',    //编译后输出的目录
  gatherwork: '.gather',   //gather在项目中会使用的文件夹
  dllLib: 'gatherLib',   //开发模式生成的dll的名字
  dllVendor: 'gatherVendor', //生产模式生成的dll的名字
  analyzerOpt: {},  //webpack-bundle-analyzer插件的配置项
  contentBase: [],  //开发模式的静态目录配置
  autoprefixer: {},  //autoprefixer的默认配置
  babel: {   //babel的默认配置
    babelrc: false,
    presets: ['react', ['es2015', { modules: false }], 'stage-0'],
    plugins: [
      'transform-decorators-legacy',
      [
        'next',
        {
          jsName: '@alife/next',
          cssName: '@alife/next',
          dir: 'lib',
          noStyle: true,
        },
      ],
    ],
    env: {
      development: {
        presets: ['react-hmre'],
      },
    },
  },
  localIdentName: '[name][local]-[hash:base64:5]', //css module的默认配置
  uglyOpt: {  //webpack.optimize.UglifyJsPlugin的配置 
    compress: {
      unused: true,
      dead_code: true,
      warnings: false,
    },
    mangle: {
      except: ['$', 'exports', 'require'],
    },
    output: {
      ascii_only: true,
    },
  },
  resolve: {  //webpack的resolve中的alias配置
    util: realPath('src/util'),
    styles: realPath('src/less'),
    commons: realPath('src/components'),
    mixins: realPath('src/mixins'),
    actions: realPath('src/pages/isv/actions'),
    api: realPath('src/pages/isv/api'),
  }
}