Click the canvas to make a ball fire at a random direction and speed subject to gravity and the ball's coefficient of restitution (bounciness).
- Babel: Transpilation to enable modern JS features and language extensions.
- Webpack: Compiling app to a browser-friendly bundle.
- Express: Web server.
The app is composed of:
- A JavaScript application compiled and bundled using webpack.
- An Express server used to serve up the static assets.
Unit testing is done with:
- Chai: BDD / TDD assertion library for node.
- Mocha: Feature-rich JavaScript test framework.
- Sinon: Standalone test spies, stubs and mocks for JavaScript.
To run the unit tests:
npm run test
To run the unit tests in watch mode:
npm run test:w
$ git clone https://github.com/leighshepperson/bouncing-balls.git
$ cd bouncing-balls
Install the project dependencies using npm:
npm i
To debug in the browser using webpack-dev-server:
npm run start
To build for production:
npm run build
To run the production server:
npm run prod