omi/packages/omi-ssr/tools
dntzhang bb8d0408c5 rename omis to omi-ssr 2019-07-20 13:18:04 +08:00
..
lib rename omis to omi-ssr 2019-07-20 13:18:04 +08:00
README.md rename omis to omi-ssr 2019-07-20 13:18:04 +08:00
build.js rename omis to omi-ssr 2019-07-20 13:18:04 +08:00
bundle.js rename omis to omi-ssr 2019-07-20 13:18:04 +08:00
clean.js rename omis to omi-ssr 2019-07-20 13:18:04 +08:00
copy.js rename omis to omi-ssr 2019-07-20 13:18:04 +08:00
deploy.js rename omis to omi-ssr 2019-07-20 13:18:04 +08:00
postcss.config.js rename omis to omi-ssr 2019-07-20 13:18:04 +08:00
render.js rename omis to omi-ssr 2019-07-20 13:18:04 +08:00
run.js rename omis to omi-ssr 2019-07-20 13:18:04 +08:00
runServer.js rename omis to omi-ssr 2019-07-20 13:18:04 +08:00
start.js rename omis to omi-ssr 2019-07-20 13:18:04 +08:00
webpack.config.js rename omis to omi-ssr 2019-07-20 13:18:04 +08:00

README.md

Build Automation Tools

yarn start (start.js)

yarn run build (build.js)

  • Cleans up the output /build folder (clean.js)
  • Copies static files to the output folder (copy.js)
  • Creates application bundles with Webpack (bundle.js, webpack.config.js)

yarn run deploy (deploy.js)

  • Builds the project from source files (build.js)
  • Pushes the contents of the /build folder to a remote server with Git

Options

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:

$ yarn run build --release --verbose      # Build the app in production mode

or

$ yarn start --release                    # Launch dev server in production mode

Misc

  • webpack.config.js - Webpack configuration for both client-side and server-side bundles
  • postcss.config.js - PostCSS configuration for transforming styles with JS plugins
  • run.js - Helps to launch other scripts with babel-node (e.g. babel-node tools/run build)
  • .eslintrc - ESLint overrides for built automation scripts