2 * Copyright 2013, 2014 IBM Corp.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 module.exports = function(grunt) {
19 // Project configuration.
21 pkg: grunt.file.readJSON('package.json'),
30 all: { src: ['test/**/*_spec.js'] },
31 core: { src: ["test/_spec.js","test/red/**/*_spec.js"]},
32 nodes: { src: ["test/nodes/**/*_spec.js"]}
36 // http://www.jshint.com/docs/options/
37 "asi": true, // allow missing semicolons
38 "curly": true, // require braces
39 "eqnull": true, // ignore ==null
40 "forin": true, // require property filtering in "for in" loops
41 "immed": true, // require immediate functions to be wrapped in ( )
42 "nonbsp": true, // warn on unexpected whitespace breaking chars
43 //"strict": true, // commented out for now as it causes 100s of warnings, but want to get there eventually
44 "loopfunc": true, // allow functions to be defined in loops
45 "sub": true // don't warn that foo['bar'] should be written as foo.bar
66 src: [ 'nodes/**/*.js' ]
71 src: [ 'public/red/**/*.js' ]
86 grunt.loadNpmTasks('grunt-simple-mocha');
87 grunt.loadNpmTasks('grunt-contrib-jshint');
89 grunt.registerTask('default', ['jshint:core','jshint:tests','jshint:editor','simplemocha:core','simplemocha:nodes']);