cool-cli
Install
npm install cool-cli
What?
A cool cli, with independent webpack config, for building app in a simple way.
Why?
We usually put our webpack configuration in our own project with popular project generator. After hundreds of projects, we config or update the webpack configuration hundreds of times. So I want to do it in a simple and cool way. Seperate all the webpack configutation out of the project, nothing to worry about webpack config anymore.
How?
- First, support
npm start
andnpm run build
. Used for dev and prod environment. - Besides basic configuration, import
happypack
to improve building speed. - Other optimization.
Usage
-
cool-cli
Options:
-V, --version output the version number
-h, --help output usage information
-
cool-cli init
Options:
-V, --version output the version number
-h, --help output usage information
-s, --skipupdate skip update yoeman and generator-cool
-c, --cnpm install yoeman and generator-cool using cnpm, default npm
-t, --tnpm install yoeman and generator-cool using tnpm, default npm
--template use your own yoeman generator as you wish
-
cool-cli preinit
Options:
-V, --version output the version number
-h, --help output usage information
-c, --cnpm install yoeman and generator-cool using cnpm, default npm
-t, --tnpm install yoeman and generator-cool using tnpm, default npm
--template use your own yoeman generator as you wish
-
cool-cli start
Options:
-V, --version output the version number
-h, --help output usage information
--cssModules turn on the css modules, default to false
--devHtmlTemplate change the dev template loaction and name, or even set false to close the html-webpack-plugin function
--bundleLibrary bundle your project into library
--library set the library name you want to export
--libraryTarget set the libray target type, default 'umd'
--notOpenBrowser not open browser after server start
--publicPath webpack config: publicPath in output
--typescript or --ts enable TypeScript support
-
cool-cli build
Options: -V, --version output the version number
-h, --help output usage information
--cssModules turn on the css modules, default to false
--prodHtmlTemplate change the prod template loaction and name, or even set false to close the html-webpack-plugin function
--bundleLibrary bundle your project into library
--library set the library name you want to export
--libraryTarget set the libray target type, default 'umd'
--hashDigestLength pass a Number to set the number of the chunkHash, or set 0 to close the hash
--bundleAnalyze visualize size of webpack output files with an interactive zoomable treemap, default false
--publicPath webpack config: publicPath in output
--typescript or --ts enable TypeScript support
--staticPath set the static path, default to true to use the default static path '/static'.
or pass the custom path
Happy Coding!!!