@ozylog/boilerplate
v0.7.1
Published
Boilerplate
Downloads
12
Readme
@ozylog/boilerplate
A boilerplate for javascript backend and react app.
Installation
npm install @ozylog/boilerplate --save-dev
App Structure
Here is the standard app structure for this boilerplate.
hello-world-app
-- dist
-- src
-- test
-- package.json
Usage
Flow
Run Flow checker.
-> boilerplate --flow
ESLint
Lint all js files in src
folder. You can see all configurations on @ozylog/eslint-config.
-> boilerplate --eslint
Stylelint
Lint all css files in src
folder by default.
-> boilerplate --stylelint
Lint all css files in path.
-> boilerplate --stylelint=src/**.css
Postcss
Compile postcss files in dist
folder by default.
-> boilerplate --postcss
Lint all css files in path.
-> boilerplate --postcss=dist/**.css
Test
Run test scripts in tests
folder.
-> boilerplate --test
-> boilerplate --test=report // run test and generate nyc report
Build
Build files in src
folder. The output will be in dist
folder.
-> boilerplate --build=node // build node js app
-> boilerplate --build=react // build react files, especially for react npm module
-> boilerplate --build=webpack // build react app with webpack
Watch
Watch files in src
folder. Run lint, flow, babel when files change.
-> boilerplate --watch=node
Dev
-> boilerplate --dev=node // --watch=node + nodemon
-> boilerplate --dev=webpack // run webpack-dev-server
License
MIT