Giter Club home page Giter Club logo

cool-cli's Introduction

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

  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

  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

  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

Happy Coding!!!

cool-cli's People

Contributors

bh-m87 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.