Skip to content

Commit

Permalink
fix(build): use test-specifc jshintrc
Browse files Browse the repository at this point in the history
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
  • Loading branch information
passy authored and eddiemonge committed Nov 20, 2013
1 parent 31f3199 commit c00c091
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions templates/common/Gruntfile.js
Expand Up @@ -35,9 +35,13 @@ module.exports = function (grunt) {
files: ['test/spec/{,*/}*.{coffee,litcoffee,coffee.md}'],
tasks: ['newer:coffee:test', 'karma']
},<% } else { %>
js: {
files: ['{.tmp,<%%= yeoman.app %>}/scripts/{,*/}*.js'],
tasks: ['newer:jshint:all']
},
jsTest: {
files: ['test/spec/{,*/}*.js'],
tasks: ['karma']
tasks: ['newer:jshint:test', 'karma']
},<% } %><% if (compassBootstrap) { %>
compass: {
files: ['<%%= yeoman.app %>/styles/{,*/}*.{scss,sass}'],
Expand All @@ -56,9 +60,8 @@ module.exports = function (grunt) {
},
files: [
'<%%= yeoman.app %>/{,*/}*.html',
'.tmp/styles/{,*/}*.css',<% if (!coffee) { %>
'{.tmp,<%%= yeoman.app %>}/scripts/{,*/}*.js',
<% } %>'<%%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}'
'.tmp/styles/{,*/}*.css',
'<%%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}'
]
}
},
Expand Down Expand Up @@ -105,9 +108,14 @@ module.exports = function (grunt) {
},
all: [
'Gruntfile.js'<% if (!coffee) { %>,
'<%%= yeoman.app %>/scripts/{,*/}*.js',
'test/spec/{,*/}*.js'<% } %>
]
'<%%= yeoman.app %>/scripts/{,*/}*.js'<% } %>
]<% if (!coffee) { %>,
test: {
options: {
jshintrc: 'test/.jshintrc'
},
src: ['test/spec/{,*/}*.js']
}<% } %>
},

// Empties folders to start fresh
Expand Down

0 comments on commit c00c091

Please sign in to comment.