Webpack Building Command Line And Boilerplate Init Tool for easywebpack.
Global Command easywebpack or easy, 目前支持如下四种构建:
vueeasywebpack-vuereacteasywebpack-reactweexeasywebpack-weexhtmleasywebpack-html
其中 Vue 和 React 支持客户端运行模式构建和服务端模式构建, Weex 支持Native模式和Web模式构建.
- 支持
Vue,React,WeexWebpack 编译和Server功能 - 支持
Vue,React,Weexeasywepback-cli 配置初始化easywebpack-cli-template - 支持
Vue,React,Weexwebpack config build 配置初始化easywebpack-cli-template - 支持
Vue,React,Weexclient render boilerplate 项目初始化easywebpack-cli-template - 支持
Vue,Reactserver side boilerplate 项目初始化egg-vue-webpack-boilerplate, egg-react-webpack-boilerplate - 支持
HTML静态多页面 Webpack 构建
$ npm i easywebpack-cli -geasywebapck -hUsage: easywebpack [command] [options]
Options:
-V, --version output the version number
-f, --filename [path] webpack config file name, default webpack.config.js
-w, --watch webpack watch and hot-update
-m, --hash webpack md5 hash js/css/image
-c, --compress webpack compress js/css/image
-b, --build [option] w(watch), m(hash) , c(compress), ex: wm/wc/mc/wmc
-h, --help output usage information
Commands:
init [options] init webpack config or boilerplate for Vue/React/Weex
install npm install
print [env] [options] print webpack config, support print by env or config node key
build [env] webpack building
server [env] webpack building and start server
clean [env] clean webpack cache
open [dir] open webpack cache dir
- easywebpack init
step one:
step two:
-
easywebpack build
-
easywebpack build -f build/webpack.config.js
-
easywebpack build -c
-
easywebpack build dev
-
easywebpack build test
-
easywebpack build prod
-
easywebpack build -b wmc
默认读取项目根目录下的 webpack.config.js 配置
-
easywebpack server
-
easywebpack server -f build/webpack.config.js
-
easywebpack server dev
-
easywebpack server test
-
easywebpack server prod
-
easywebpack server -b wmc
默认读取项目根目录下的 webpack.config.js 配置
easywebpack print -hUsage: print [env] [options]
print webpack config, support print by env or config node key
Options:
-n, --node [key] print webpack config info by config node key, example: [module/module.rules/plugins] and so on
-h, --help output usage information
-
easywebpack print -n module
-
easywebpack print dev -n entry
-
easywebpack print test -n module.rules
-
easywebpack print prod -n module.rules[0]
-
easywebpack print -n plugins
-
easywebpack print -n plugins[0]
-
easywebpack print -n output
-
easywebpack print -n resolve
easy cleaneasy open默认读取项目根目录下的 webpack.config.js 配置
说明: npm 模板下载参考 egg-init 脚手架实现.

