Skip to content

Latest commit

 

History

History
52 lines (36 loc) · 1.2 KB

DEVELOPMENT.md

File metadata and controls

52 lines (36 loc) · 1.2 KB

Get the code and install dependencies

git clone git@github.com:sonph/metronome.git
cd metronome
yarn install

References

Development flow

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/

Testing

  • 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

Styleguide

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.