Yeoman generator for a JS boilerplate project
Yeoman generator for a JS boilerplate project
A boilerpate JS project structure, with babel-powered ES8 transpiling, eslint (with amazing settings provided by yours truly, pm2, nodemon, jest unit tests, …
yarn add global generator-js-tiphedor
# or
npm i -g generator-js-tiphedor
yo js-tiphedor
The project ships with a couple of useful scripts that you can invoke with npm run <script>
or yarn <script>
. Thoses scripts are:
start
alias to start:dev
start:dev
Runs the project in dev mode (using babel-node
, so with sub-optimal perfomances), watched by nodemon
start:prod
Runs build:prod
to transpile the code, then serves the app as a pm2 deamon (so with auto-restart, …), and then attaches the logs of the app to the terminal. Ctrl-C
will only stop the logging, to stop the app use stop
stop
alias to stop:dev
stop:dev
stops the pm2 deamonbuild
alias to build:prod
build:prod
transpiles the ES8 code to standard JS, and places the result in the dist
folder.test
runs test:lint
and test:unit
test:lint
runs eslint on the whole projecttest:unit
runs all the unit tests, located in ./src/*.{test,spec}.js
. Saves the coverage info to ./coverage