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 🙏

© 2026 – Pkg Stats / Ryan Hefner

wci-build

v3.1.0

Published

A webpack scaffold

Downloads

153

Readme

wci-build

基于react16、react-router4、redux的webpack构建工具,开发者可以选择集成设计类开发框架(例如:antd),可用于开发大型网站、管理系统等,功能包含但不限于如下:
  • 集成最新react16、react-router4
  • 支持css预编译、模块化,集成less、postcss兼容各个版本浏览器(IE9以上)
  • 支持集成蚂蚁金服antd、antd-mobile,支持自定义样式,支持antd动态加载
  • 支持开发环境热更新、支持模块化API接口、支持mac、window双系统开发
  • 支持测试、生产代码自动添加版本号,支持代码合并、压缩,支持第三方库抽离,支持css代码抽离 // todo
  • 支持开发环境IP地址、端口可配置、后端API接口可配置
  • 支持三层eslint校验(1.开发工具校验 2.代码打包校验 3.git校验)

安装

npm install wci-build --save-dev

更新

npm update wci-build

使用

可以直接使用wci-cli脚手架直接生成wci项目,单独使用wci-build需要做以下配置

  • 安装依赖
npm install react react-dom react-redux react-router-dom redux redux-thunk --save-dev
  • 创建项目目录
myapp
├── app // 项目业务代码
│   ├── assets // 静态文件目录(图片、字体等)
│   ├── script // js代码目录
│   │   ├── actions // redux action目录
│   │   ├── componets // react 无状态组件目录
│   │   ├── containers // react 业务代码
│   │   ├── reducers // redux reducer目录
│   │   ├── util // 工具包目录
│   │   │   ├── theme.js // antd自定义样式文件
│   │   ├── Home.js // 首页
│   │   ├── home.less // 首页样式
│   ├── styles // 全局样式目录
│   ├── index.js // 项目入口文件
│   ├── index.tpl.html // 项目html模版
├── node_modules // 依赖包目录
├── .babelrc // babel配置文件
├── .eslintrc // eslint代码校验配置文件
├── .gitignore
├── package.json
├── README.md
├── wci.json // wci项目配置文件(主要配置一些开发、测试、生产环境的信息)
└── webpack.js // webpack自定义配置文件
  • 新建.babelrc|.eslintrc文件

.babelrc

{
  "presets": [
    "es2015-ie",
    "react",
    "stage-0"
  ],
  "plugins": [
    "transform-decorators-legacy"
  ]
}

.eslintrc

{
  "extends": "airbnb",
  "parser": "babel-eslint",
  "env": {
    "browser": true,
    "node": true,
    "mocha": true
  },
  "globals": {
    "Babel": true,
    "React": true
  },
  "plugins": [
    "react"
  ],
  "rules": {
    "import/no-extraneous-dependencies": "off",
    "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
    "global-require": "off",
    "linebreak-style": "off",
    "no-underscore-dangle": "off",
  }
}
  • 新建wci.json文件
{
  "index": "app/index.js",
  "hostname": "127.0.0.1",
  "dev": {
    "port": 8031,
    "src": "app",
    "is_eslint": false,
    "modules": {
      "module1": {
        "host": "",
        "path": ""
      }
    }
  },
  "test": {
    "port": 9031,
    "src": "test",
    "modules": {
      "module1": {
        "host": "",
        "path": ""
      }
    }
  },
  "prod": {
    "port": 9031,
    "src": "dist",
    "modules": {
      "module1": {
        "host": "",
        "path": ""
      }
    }
  }
}
  • 修改package.json运行脚本
"scripts": {
    "start": "wci-build run start",
    "test": "wci-build run test",
    "dist": "wci-build run dist"
  },

运行

npm run start // 开发环境
npm run test  // 测试环境
npm run dist  // 生产环境