Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JSHint support and enable strict mode #379

Merged
merged 7 commits into from
Mar 5, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* http://opensource.org/licenses/MIT
* ---------------------------------- */

/* jshint node: true */
module.exports = function(grunt) {
'use strict';

Expand Down Expand Up @@ -148,6 +149,21 @@ module.exports = function(grunt) {
docs: {}
},

jshint: {
options: {
jshintrc: 'js/.jshintrc'
},
grunt: {
src: 'Gruntfile.js'
},
src: {
src: 'js/*.js'
},
docs: {
src: ['docs/assets/js/docs.js', 'docs/assets/js/fingerblast.js']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can/should we do something like: docs/assets/js/*.js?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but that folder might have more files like docs.min.js (see the uglify PR)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool

}
},

validation: {
options: {
charset: 'utf-8',
Expand Down Expand Up @@ -186,9 +202,9 @@ module.exports = function(grunt) {
grunt.registerTask('dist-js', ['concat', 'uglify']);
grunt.registerTask('dist', ['dist-css', 'dist-js', 'copy']);
grunt.registerTask('validate-html', ['jekyll', 'validation']);
grunt.registerTask('default', ['dist']);
grunt.registerTask('build', ['dist']);
grunt.registerTask('test', ['dist', 'validate-html']);
grunt.registerTask('default', ['dist']);
grunt.registerTask('test', ['dist', 'jshint', 'validate-html']);

// Version numbering task.
// grunt change-version-number --oldver=A.B.C --newver=X.Y.Z
Expand Down
Loading