@easy-team/easywebpack-cli
Webpack Building Command Line And Boilerplate Init Tool
Last updated 14 days ago by hubcarl .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @easy-team/easywebpack-cli 
SYNC missed versions from official npm registry.

easywebpack-cli


NPM version build status Test coverage David deps npm download

A Powerful Cross-platform Webpack CLI Tool

Install

$ npm i @easy-team/easywebpack-cli -g

Version

  • @easy-team/easywebpack-cli -> @easy-team/easywebpack (Babel 7)
  • easywebpack-cli -> easywebpack (Babel 6)

Features

  • ✔︎ Provide easywebpack and webapck development and build capabilities
  • ✔︎ Provide multiple types of project initialization, such as React, Vue, Egg projects
  • ✔︎ Provide multiple types of project builds, such as React, Vue, Egg, Weex projects
  • ✔︎ Provide webpack basic development and build capabilities, such as dev server, hot-reload, typescript, dll
  • ✔︎ Enhance Webpack-based development and build capabilities, such as build speed, build size capabilities
  • ✔︎ Provide easywebpack solution development and build capabilities
  • ✔︎ Built-in normal development commands, such easy clean, easy open, easy kill, easy server

Documents

Command

Support easywebpack and webpack modes,default easywebpack mode, you can specify the wepback build mode by --webpack. Default read ${root}/webpack.config.js webpack config file.

  • easywebpack mode: use easywebpack webpack config
  • Webpack mode: use native webpack config
easy -h

Usage: easy [command] [options]

Options:

-v, --version          output the version number
-f, --filename [path]  webpack config file path
-p, --port [port]      webpack server port
-s, --size [option]    webpack build size analyzer tool, support size: analyzer and stats, default analyzer
--dll                  only webpack dll config
--web                  only webpack web config
--node                 only webpack node config
--speed                stat webpack build speed
--devtool [devtool]    webpack devtool config
-h, --help             output usage information

Commands:

init [options]         init webpack config or boilerplate for Vue/React/Weex
install [options]      dynamic install easywebpack missing npm module
upgrade [options]      upgrade project package to latest version
print [options] [env]  print webpack config, support print by env or config node key
dll [env]              webpack dll build
build [options] [env]  webpack building
server [options]       static file web http server
dev [env]              start webpack dev server for develoment mode
start [env]            start webpack dev server for develoment mode
doc                    open github or document page
zip [options]          archive files to zip file
tar [options]          archive files to tar file
deploy                 upload file to deplay space
upgrade                upgrade webpack and npm package
clean [dir]            webpack cache dir clean, if dir == "all", will clean cache dir and build dir
open [dir]             open webpack cache dir
kill [port]            kill port process, default will kill 7001, 9000, 9001

Project Initialization

  • easy init

step one:

step one

step two:

step two

Project Development

easywebpack

  • easy dev

  • easy dev -f build/webpack.config.js

webpack

  • easy dev --webpack

  • easy dev -f build/webpack.config.js --webpack

Project Building

easywebpack

  • easy build prod

  • easy build -f build/webpack.config.js

webpack

  • easy build -f build/webpack.config.js --webpack

Upgrade

  • upgrade webpack3 to webpack4
easy upgrade
  • upgrade egg project to webpack4
easy upgrade --egg
  • upgrade babel 6 to babel 7
easy upgrade --babel

Puppeteer Html Prerender

easy puppeteer --url http://49.233.172.37:7001/csr

Clean Cache

easy clean

Open Directory

easy open

Kill Port

easy kill 7001
easy kill 7001,9000,9001

Webpack Build Size

  • webpack-bundle-analyzer
easy build -s 
  • stats-webpack-plugin
easy build -s stats

Webpack Build Speed

Use the plugin speed-measure-webpack-plugin for build speed analysis and count the time spent on each loader and plugin

easy build --speed

Start Web HTTP Server

Use the plugin node-http-server for local directory compilation access, automatically find HTML files

  • serve current dir
easy server
  • serve specify port and directory
easy server -p 8888 -d dist

Print Webpack Config Info

easy print -h

Usage: print [env] [options]

print webpack config, support print by env or config node key

Options:

-k, --key [name]  print webpack config info by config key name, example: [module/module.rules/plugins] and so on
-h, --help        output usage information
  • easy print -k module

  • easy print dev -k entry

  • easy print test -k module.rules

  • easy print prod -k module.rules[0]

  • easy print -k plugins

  • easy print -k plugins[0]

  • easy print -k output

  • easy print -k resolve

License

MIT

Current Tags

  • 4.1.0-beta.2                                ...           @easy-team/beat (8 months ago)
  • 4.1.0-beta.3                                ...           @easy-team/beta (8 months ago)
  • 4.4.2                                ...           latest (14 days ago)

15 Versions

  • 4.4.2                                ...           14 days ago
  • 4.4.1                                ...           4 months ago
  • 4.4.0                                ...           5 months ago
  • 4.3.2                                ...           5 months ago
  • 4.3.1                                ...           6 months ago
  • 4.3.0                                ...           6 months ago
  • 4.2.1                                ...           7 months ago
  • 4.2.0                                ...           7 months ago
  • 4.1.2                                ...           7 months ago
  • 4.1.1                                ...           8 months ago
  • 4.1.0                                ...           8 months ago
  • 4.1.0-beta.3                                ...           8 months ago
  • 4.1.0-beta.2                                ...           8 months ago
  • 4.1.0-beta.1                                ...           8 months ago
  • 4.0.0                                ...           10 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 449
Last Day 10
Last Week 151
Last Month 486
Dependencies (21)
Dev Dependencies (8)

Copyright 2014 - 2016 © taobao.org |