git clone git@github.com:sonph/metronome.git
cd metronome
yarn install
yarn pug:watch # For generating html from pug templates.
yarn webpack:watch # For building and bundling javascript.
yarn webserver # Starts python webserver.
Then navigate to http://localhost:8000/
-
Run test once
yarn test
-
Watch the entire test suite and re-run when tests changed
yarn test:watch
-
To always run tests before pushing:
ln -s $PWD/git-hooks/pre-push .git/hooks/pre-push
Follow the Google JavaScript style guide.
To auto-format JS code, use clang-format
.
Guide.
-
Download pre-built binaries for your platform from release.llvm.org
-
Extract
-
Run
./<download-dir>/bin/clang-format --style=Google -i <path/to/file.js>
- Note
-i
means editing the file in place. Omit it to view formatted output in stdout.
- Note