Dependencies for building from source and running tests:
- Git - follow the Github Guide to Installing Git
- Node.js - depending on your system, you can install Node either from source or as a pre-packaged bundle
- Grunt - run:
sudo npm install -g grunt-cli
- Bower: - run:
sudo npm install -g bower
Use Grunt to generate the non-minified and minified scroll-up-bar files:
# Clone your Github repository:
git clone git://github.com:<github username>/scroll-up-bar.git
# Go to the scroll-up-bar directory:
cd scroll-up-bar
# Install node.js dependencies:
npm install
# Install bower components:
bower install
# Build scroll-up-bar:
grunt build
- JavaScript style should follow the Google JS style guide
- Wrap code at 80 chars
- Check syntax with
grunt jshint
- Be consistent with the code around you!
- Always have test coverage for new features or bug fixes, and never break existing tests. Use
grunt test
to run tests - Commits should represent one logical change each; if a feature goes through multiple iterations, squash your commits into to one
- If you need to change a commit after the pull request was sent, ammend it and force the push instead of opening a new pull request
Follow the Tim Pope's commit message format.
In summary, the rules are
- Title: 50 chars or less.
- Body: wrap it to about 72 characters or so.
- Write your commit message in the imperative: "Fix bug" and not "Fixed bug".