Directory Layout:
├── /app/ # The source code of the application
│ ├── /containers/ # Components that provide context (e.g. Redux Provider)
│ ├── /public/ # Static files which are copied into the /dist/ root folder
│ ├── /tmpl/ # Static content (plain HTML or Markdown)
│ ├── /utils/ # Generic utilities
│
├── /build/ # The folder for compiled output
├── /dist/ # The folder for deploy output
├── /node_modules/ # 3rd-party libraries and utilities
├── .babelrc # configuration file for babel
├── .editorconfig # Configures editor rules
├── .eslintrc # Configures ESLint
├── .eslintignore # ingore folders/files while using ESLint
├── stats.json # Analyzing build statistics
├── webpack.config.js # configuration file for webpack
├── package.json # The list of 3rd party libraries and utilities
Dev:
$ npm run dev
Dev quiet(only show important infos):
$ npm run dev-quiet
Browser sync:
$ npm run browsersync
esLint:
$ npm run lint
stats:
$ npm run stats (after executed, upload 'stats.json' file to http://webpack.github.io/analyse/ or https://chrisbateman.github.io/webpack-visualizer/ or https://alexkuz.github.io/webpack-chart/)
Deploy:
$ npm run deploy
For windows user: download git windows for running the commonds: https://git-scm.com/download
Image compress:
By default "npm run tinypng" will replace the original png files, there more usage:
tinypng [options] [image.png|*.png]
-k, --api-key Set default TinyPNG API key.
-r, --allow-rewrite Rewrite the original files with compressed data.
-n, --allow-nonpng Allow you to compress files without .png extention.
-p, --postfix Postfix for compressed files when rewriting disabled.
-h, --help This message.
-v, --version Show version.
you can custom the scripts in package.json file.
the Babel polyfill wasn't included in the framework by default, feel free to follow this the article below if you want to use it. http://jamesknelson.com/using-es6-in-the-browser-with-babel-6-and-webpack/?utm_source=jsgroup In ubuntu system, when you try npm run deploy, it might be cause the errors, if you againest with this, try remove the FaviconsWebpackPlugin configs on webpack.config.js.