cool-cli

1.4.1 • Public • Published

cool-cli

npm version GitHub license

中文版

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?

  1. First, support npm start and npm run build. Used for dev and prod environment.
  2. Besides basic configuration, import happypack to improve building speed.
  3. Other optimization.

Usage

  1. cool-cli

    Options:

    -V, --version output the version number

    -h, --help output usage information

  2. 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

  3. 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

  4. 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

  5. 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!!!

Readme

Keywords

none

Package Sidebar

Install

npm i cool-cli

Weekly Downloads

4

Version

1.4.1

License

MIT

Unpacked Size

68.2 kB

Total Files

28

Last publish

Collaborators

  • r_java