Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
adding grunt validation and cleanup tasks, adding npm test
- Loading branch information
Showing
5 changed files
with
111 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
language: node_js | ||
node_js: | ||
- 0.10 | ||
notifications: | ||
email: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Contribution Guidelines | ||
|
||
## Reporting issues | ||
|
||
- **Search for existing issues.** Please check to see if someone else has reported the same issue. | ||
- **Share as much information as possible.** Include operating system and version, browser and version. Also, include steps to reproduce the bug. | ||
|
||
## Project Setup | ||
|
||
Refer to the [README](). | ||
|
||
## Code Style | ||
|
||
### JavaScript | ||
|
||
JS files must pass JSHint using the provided [.jshintrc]() settings. | ||
|
||
Additionally, JS files need to be run through [JSBeautify](https://github.com/einars/js-beautify) with the provided [.jsbeautifyrc](). | ||
|
||
**TL;DR** Run `grunt clean` before pushing a commit. It will validate and beautify your JS. | ||
|
||
#### Variable Naming | ||
|
||
- `lowerCamelCase` General variables | ||
- `UpperCamelCase` Constructor functions | ||
|
||
## Pull requests | ||
|
||
- Try not to pollute your pull request with unintended changes – keep them simple and small. If possible, squash your commits. | ||
- If your PR resolves an issue, include **closes #ISSUE_NUMBER** in your commit message (or a [synonym](https://help.github.com/articles/closing-issues-via-commit-messages)). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
module.exports = function (grunt) { | ||
|
||
grunt.initConfig({ | ||
jshint: { | ||
all: ['*.js'], | ||
options: { | ||
jshintrc: '.jshintrc' | ||
} | ||
}, | ||
jsbeautifier: { | ||
modify: { | ||
src: ['*.js'], | ||
options: { | ||
config: '.jsbeautifyrc' | ||
} | ||
}, | ||
validate: { | ||
src: ['*.js'], | ||
options: { | ||
mode: 'VERIFY_ONLY', | ||
config: '.jsbeautifyrc' | ||
} | ||
} | ||
} | ||
}); | ||
|
||
grunt.loadNpmTasks('grunt-jsbeautifier'); | ||
grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
|
||
grunt.registerTask('default', ['clean']); | ||
|
||
// Clean code before a commit | ||
grunt.registerTask('clean', ['jsbeautifier:modify', 'jshint']); | ||
|
||
// Validate code (read only) | ||
grunt.registerTask('validate', ['jsbeautifier:validate', 'jshint']); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters