Boilerplate code to create a JavaScript application using Babel, SASS and EJS, packaged by Webpack.
Based on https://github.com/cvgellhorn/webpack-boilerplate
Install dependencies as usual:
npm install
Launching a local server (webpack-dev-server) with livereload and automatic recompilation on changes. Server will be available at http://localhost:8080
npm run dev
npm run build
Build output will be stored in ./dist-folder.
Unit tests are run via Mocha, which is installed as a dependency, along with Chai as the assertion library. You can run the tests by using:
npm test
Unit tests go in the ./test-folder. The file name for a unit test must be equal to the file it is testing, but contain the suffix ".test", e.g. Functions.js will have a test file Functions.test.js.
Tests will be available at http://localhost:8080/test/test.html.
Configurations for all target environments are in the root of the repository in the webpack.config.{TARGET}.js files.