Omi server side rendering
$ npm i omi-cli -g # install cli
$ omi init-s my-app # init project
$ cd my-app
$ npm start # develop
$ npm run build # release- Cleans up the output
/builddirectory (clean.js) - Copies static files to the output folder (
copy.js) - Launches Webpack compiler in a watch mode (via webpack-middleware)
- Launches Node.js server from the compiled output folder (
runServer.js) - Launches Browsersync and Hot Module Replacement
- Cleans up the output
/buildfolder (clean.js) - Copies static files to the output folder (
copy.js) - Creates application bundles with Webpack (
bundle.js,webpack.config.js)
- Builds the project from source files (
build.js) - Pushes the contents of the
/buildfolder to a remote server with Git
| Flag | Description |
|---|---|
--release |
Minimizes and optimizes the compiled output |
--verbose |
Prints detailed information to the console |
--analyze |
Launches Webpack Bundle Analyzer |
--static |
Renders specified routes as static html files |
--docker |
Build an image from a Dockerfile |
--silent |
Do not open the default browser |
For example:
$ npm run build --release --verbose # Build the app in production modeor
$ npm start --release # Launch dev server in production modewebpack.config.js- Webpack configuration for both client-side and server-side bundlespostcss.config.js- PostCSS configuration for transforming styles with JS pluginsrun.js- Helps to launch other scripts withbabel-node(e.g.babel-node tools/run build).eslintrc- ESLint overrides for built automation scripts
MIT © dntzhang
react-starter-kit Copyright © 2014-present Kriasoft, LLC.