Skip to content

Commit c00c091

Browse files
passyeddiemonge
authored andcommitted
fix(build): use test-specifc jshintrc
jshint would not pick up the correct test-specific `.jshintrc` file and throw a warning during the build process if it wasn't specified explictly. closes #477
1 parent 31f3199 commit c00c091

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

Diff for: templates/common/Gruntfile.js

+15-7
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,13 @@ module.exports = function (grunt) {
3535
files: ['test/spec/{,*/}*.{coffee,litcoffee,coffee.md}'],
3636
tasks: ['newer:coffee:test', 'karma']
3737
},<% } else { %>
38+
js: {
39+
files: ['{.tmp,<%%= yeoman.app %>}/scripts/{,*/}*.js'],
40+
tasks: ['newer:jshint:all']
41+
},
3842
jsTest: {
3943
files: ['test/spec/{,*/}*.js'],
40-
tasks: ['karma']
44+
tasks: ['newer:jshint:test', 'karma']
4145
},<% } %><% if (compassBootstrap) { %>
4246
compass: {
4347
files: ['<%%= yeoman.app %>/styles/{,*/}*.{scss,sass}'],
@@ -56,9 +60,8 @@ module.exports = function (grunt) {
5660
},
5761
files: [
5862
'<%%= yeoman.app %>/{,*/}*.html',
59-
'.tmp/styles/{,*/}*.css',<% if (!coffee) { %>
60-
'{.tmp,<%%= yeoman.app %>}/scripts/{,*/}*.js',
61-
<% } %>'<%%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}'
63+
'.tmp/styles/{,*/}*.css',
64+
'<%%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}'
6265
]
6366
}
6467
},
@@ -105,9 +108,14 @@ module.exports = function (grunt) {
105108
},
106109
all: [
107110
'Gruntfile.js'<% if (!coffee) { %>,
108-
'<%%= yeoman.app %>/scripts/{,*/}*.js',
109-
'test/spec/{,*/}*.js'<% } %>
110-
]
111+
'<%%= yeoman.app %>/scripts/{,*/}*.js'<% } %>
112+
]<% if (!coffee) { %>,
113+
test: {
114+
options: {
115+
jshintrc: 'test/.jshintrc'
116+
},
117+
src: ['test/spec/{,*/}*.js']
118+
}<% } %>
111119
},
112120

113121
// Empties folders to start fresh

0 commit comments

Comments
 (0)