diff --git a/Gruntfile.js b/Gruntfile.js index fe87778a..56c6db10 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -129,6 +129,9 @@ module.exports = function(grunt) { }, clean: { build: ['dist/*'] + }, + jshint: { + all: ['src/**/*.js'] } }; @@ -148,10 +151,11 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-replace'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-clean'); + grunt.loadNpmTasks('grunt-contrib-jshint'); // Tasks grunt.registerTask('dev', ['clean', 'concat:source', 'replace:dev']); grunt.registerTask('full', ['clean', 'concat:source', 'replace:dev', 'uglify', 'replace:prod']); grunt.registerTask('test', ['concat:test']); - + grunt.registerTask('hint', ['jshint']); }; \ No newline at end of file diff --git a/README.md b/README.md index c13bda1d..f80bfda8 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ #Building the KineticJS Framework To build the framework, you need to have node and grunt installed. After that, run `npm install` to install the node module dependencies. -To build a development version of the framework, run `grunt dev`, To run a full build, which also produces the minified version and the individually minified modules for the custom build, run `grunt full`. +To build a development version of the framework, run `grunt dev`. To run a full build, which also produces the minified version and the individually minified modules for the custom build, run `grunt full`. If you add a file in the src directory, be sure to add the filename to the sourceFiles array variable in Gruntfile.js. @@ -22,4 +22,4 @@ To add / modify unit tests, be sure to do so in the `tests/js/unit` directory, b TIP: prepend a test name with a `*` to only run that particular test, or prepend a test name with `!` to omit that test. #Pull Requests -I'd be happy to review any pull requests that may better the KineticJS project, in particular if you have a bug fix, enhancement, or a new shape (see `src/shapes` for examples). Before doing so, please first make sure that all of the unit tests and functional tests pass. +I'd be happy to review any pull requests that may better the KineticJS project, in particular if you have a bug fix, enhancement, or a new shape (see `src/shapes` for examples). Before doing so, please first make sure that all of the unit tests and functional tests pass, and also make sure that you don't have any jshint errors. You can do so by running `grunt hint` diff --git a/package.json b/package.json index da650d8e..e9d058ff 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.0.0", "devDependencies": { "grunt": "~0.4.1", - "grunt-contrib-jshint": "~0.1.1", + "grunt-contrib-jshint": "~0.5.4", "grunt-contrib-nodeunit": "~0.1.2", "grunt-contrib-uglify": "~0.2.2", "grunt-contrib-concat": "~0.3.0",