mirror of
https://github.com/konvajs/konva.git
synced 2025-09-19 19:07:59 +08:00
added jshint to the build
This commit is contained in:
@@ -129,6 +129,9 @@ module.exports = function(grunt) {
|
|||||||
},
|
},
|
||||||
clean: {
|
clean: {
|
||||||
build: ['dist/*']
|
build: ['dist/*']
|
||||||
|
},
|
||||||
|
jshint: {
|
||||||
|
all: ['src/**/*.js']
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -148,10 +151,11 @@ module.exports = function(grunt) {
|
|||||||
grunt.loadNpmTasks('grunt-replace');
|
grunt.loadNpmTasks('grunt-replace');
|
||||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||||
|
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||||
|
|
||||||
// Tasks
|
// Tasks
|
||||||
grunt.registerTask('dev', ['clean', 'concat:source', 'replace:dev']);
|
grunt.registerTask('dev', ['clean', 'concat:source', 'replace:dev']);
|
||||||
grunt.registerTask('full', ['clean', 'concat:source', 'replace:dev', 'uglify', 'replace:prod']);
|
grunt.registerTask('full', ['clean', 'concat:source', 'replace:dev', 'uglify', 'replace:prod']);
|
||||||
grunt.registerTask('test', ['concat:test']);
|
grunt.registerTask('test', ['concat:test']);
|
||||||
|
grunt.registerTask('hint', ['jshint']);
|
||||||
};
|
};
|
@@ -1,7 +1,7 @@
|
|||||||
#Building the KineticJS Framework
|
#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 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.
|
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.
|
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
|
#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`
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"grunt": "~0.4.1",
|
"grunt": "~0.4.1",
|
||||||
"grunt-contrib-jshint": "~0.1.1",
|
"grunt-contrib-jshint": "~0.5.4",
|
||||||
"grunt-contrib-nodeunit": "~0.1.2",
|
"grunt-contrib-nodeunit": "~0.1.2",
|
||||||
"grunt-contrib-uglify": "~0.2.2",
|
"grunt-contrib-uglify": "~0.2.2",
|
||||||
"grunt-contrib-concat": "~0.3.0",
|
"grunt-contrib-concat": "~0.3.0",
|
||||||
|
Reference in New Issue
Block a user