README.md (1966B)
1 # Build Automation Tools 2 3 ### `yarn start` (`start.js`) 4 5 * Cleans up the output `/build` directory (`clean.js`) 6 * Copies static files to the output folder (`copy.js`) 7 * Launches [Webpack](https://webpack.github.io/) compiler in a watch mode (via [webpack-middleware](https://github.com/kriasoft/webpack-middleware)) 8 * Launches Node.js server from the compiled output folder (`runServer.js`) 9 * Launches [Browsersync](https://browsersync.io/), 10 [Hot Module Replacement](https://webpack.github.io/docs/hot-module-replacement), and 11 [React Hot Loader](https://github.com/gaearon/react-hot-loader) 12 13 ### `yarn run build` (`build.js`) 14 15 * Cleans up the output `/build` folder (`clean.js`) 16 * Copies static files to the output folder (`copy.js`) 17 * Creates application bundles with Webpack (`bundle.js`, `webpack.config.js`) 18 19 ### `yarn run deploy` (`deploy.js`) 20 21 * Builds the project from source files (`build.js`) 22 * Pushes the contents of the `/build` folder to a remote server with Git 23 24 ## Options 25 26 Flag | Description 27 ----------- | -------------------------------------------------- 28 `--release` | Minimizes and optimizes the compiled output 29 `--verbose` | Prints detailed information to the console 30 `--analyze` | Launches [Webpack Bundle Analyzer](https://github.com/th0r/webpack-bundle-analyzer) 31 `--static` | Renders [specified routes](./render.js#L15) as static html files 32 `--docker` | Build an image from a Dockerfile 33 34 For example: 35 36 ```sh 37 $ yarn run build -- --release --verbose # Build the app in production mode 38 ``` 39 40 or 41 42 ```sh 43 $ yarn start -- --release # Launch dev server in production mode 44 ``` 45 46 ## Misc 47 48 * `webpack.config.js` - Webpack configuration for both client-side and server-side bundles 49 * `postcss.config.js` - PostCSS configuration for transforming styles with JS plugins 50 * `run.js` - Helps to launch other scripts with `babel-node` (e.g. `babel-node tools/run build`) 51 * `.eslintrc` - ESLint overrides for built automation scripts