You'll need Node and NPM. That's it. It's recommended to use NVM in order to use multiple versions of Node on the same system.
From your command line:
npm install
This will install all the dependencies to get the project up and running.
Make a copy of the .env.example
file e.g.
cp .env.example .env
This will define which ports to use; change as necessary.
To fire up your stack use:
npm start
This will give you some goodies:
- localhost environment
- live/hot-reloading
- continuous testing (@todo), doc generation and linting
This is your development webserver. It will auto-reload with file changes.
Arguably more useful than :9000
, this is the port the npm start
command will open and it will sync actions across connected browsers which makes it very useful for testing.
This is the UI for BrowserSync to toggle settings etc.
Runs the unit tests in the browser for debugging. Also triggers the command line run of the tests.
Displays the test coverage of the application. Although this is auto-generated upon each test run, these pages don't auto-reload.
Displays the comment-generated JS Documentation using JSDoc. Again, it's auto-generated when files are changed but the page must be refreshed manually.
We use Webpack to bundle/build our app. It also serves the application locally in development.
Look at the Webpack docs for more information.
./config/webpack.config.js
By default this repo looks at src/index.js
for it's entry point to the app.
./config/webpack.config.dev.js
This basically extends the webpack.config.js
file with config only appropriate to development; e.g. development settings and plugins.
./config/webpack.config.dev.js
This basically extends the webpack.config.js
file with config only appropriate to testing; e.g. isparta code coverage for ES6.
The docs are generated using comments within the code, look at JSDoc for more information.
The repo also has .editorconfig
and .eslintrc
files to try and maintain some level of consistency across the codebases.