// See https://github.com/sindresorhus/grunt-eslint/issues/119
quiet: true
},
- dist: "dist/jquery.js",
- dev: [ "src/**/*.js", "Gruntfile.js", "test/**/*.js", "build/**/*.js" ]
+
+ // We have to explicitly declare "src" property otherwise "newer"
+ // task wouldn't work properly :/
+ dist: {
+ src: "dist/jquery.js"
+ },
+ dev: {
+ src: [ "src/**/*.js", "Gruntfile.js", "test/**/*.js", "build/**/*.js" ]
+ }
},
testswarm: {
tests: [
]
},
watch: {
- files: [ "<%= eslint.dev %>" ],
+ files: [ "<%= eslint.dev.src %>" ],
tasks: [ "dev" ]
},
uglify: {
grunt.registerTask( "lint", [
"jsonlint",
- runIfNewNode( "eslint:dev" ),
- runIfNewNode( "eslint:dist" )
+ runIfNewNode( "eslint" )
] );
- grunt.registerTask( "test_fast", [ runIfNewNode( "node_smoke_tests" ) ] );
+ grunt.registerTask( "lint:newer", [
+ "newer:jsonlint",
+ runIfNewNode( "newer:eslint" )
+ ] );
- grunt.registerTask( "test", [ "test_fast" ].concat(
- [ runIfNewNode( "promises_aplus_tests" ) ]
- ) );
+ grunt.registerTask( "test:fast", runIfNewNode( "node_smoke_tests" ) );
+ grunt.registerTask( "test:slow", runIfNewNode( "promises_aplus_tests" ) );
+
+ grunt.registerTask( "test", [
+ "test:fast",
+ "test:slow"
+ ] );
- // Short list as a high frequency watch task
grunt.registerTask( "dev", [
- "build:*:*",
- runIfNewNode( "newer:eslint:dev" ),
- "uglify",
- "remove_map_comment",
- "dist:*"
- ]
- );
+ "build:*:*",
+ runIfNewNode( "newer:eslint:dev" ),
+ "newer:uglify",
+ "remove_map_comment",
+ "dist:*",
+ "compare_size"
+ ] );
grunt.registerTask( "default", [
- "dev",
+ runIfNewNode( "eslint:dev" ),
+ "build:*:*",
+ "uglify",
+ "remove_map_comment",
+ "dist:*",
runIfNewNode( "eslint:dist" ),
- "test_fast",
+ "test:fast",
"compare_size"
] );
-
- grunt.registerTask( "precommit_lint", [
- "newer:jsonlint",
- runIfNewNode( "newer:eslint:dev" ),
- runIfNewNode( "newer:eslint:dist" )
- ] );
};
"scripts": {
"build": "npm install && grunt",
"start": "grunt watch",
- "test": "grunt && grunt test",
- "precommit": "grunt precommit_lint",
+ "test": "grunt && grunt test:slow",
+ "precommit": "grunt lint:newer",
"commitmsg": "node node_modules/commitplease"
},
"commitplease": {