added jshint to the build

This commit is contained in:
Eric Rowell
2013-06-01 16:13:33 -07:00
parent 2409b99844
commit 8bc007118c
3 changed files with 8 additions and 4 deletions

View File

@@ -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']);
};

View File

@@ -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`

View File

@@ -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",