Added jshint file for unit tests, and grunt task to verify test syntax.
This commit is contained in:
@@ -3,6 +3,7 @@ module.exports = function(grunt) {
|
||||
// Concat and Minify the src directory into dist
|
||||
grunt.registerTask('build', [
|
||||
'jshint:source',
|
||||
'jshint:tests',
|
||||
'clean:on_start',
|
||||
'less:src',
|
||||
'copy:everything_but_less_to_temp',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Lint and build CSS
|
||||
module.exports = function(grunt) {
|
||||
grunt.registerTask('default', ['jshint:source', 'less:src']);
|
||||
grunt.registerTask('default', ['jshint:source', 'jshint:tests', 'less:src']);
|
||||
grunt.registerTask('test', ['default', 'karma:test']);
|
||||
};
|
||||
@@ -1,13 +1,18 @@
|
||||
module.exports = function(config) {
|
||||
return {
|
||||
// just lint the source dir
|
||||
source: {
|
||||
files: {
|
||||
src: ['Gruntfile.js', '<%= srcDir %>/app/**/*.js']
|
||||
src: ['Gruntfile.js', '<%= srcDir %>/app/**/*.js'],
|
||||
}
|
||||
},
|
||||
tests: {
|
||||
files: {
|
||||
src: ['<%= srcDir %>/test/**/*.js'],
|
||||
}
|
||||
},
|
||||
options: {
|
||||
jshintrc: '<%= baseDir %>/.jshintrc',
|
||||
jshintrc: true,
|
||||
reporter: require('jshint-stylish'),
|
||||
ignores: [
|
||||
'node_modules/*',
|
||||
'dist/*',
|
||||
|
||||
Reference in New Issue
Block a user