feat(gen): add jscs · yeoman/generator-angular@f407573

@@ -47,14 +47,14 @@ module.exports = function (grunt) {

4747

},<% } else { %>

4848

js: {

4949

files: ['<%%= yeoman.app %>/scripts/{,*/}*.js'],

50-

tasks: ['newer:jshint:all'],

50+

tasks: ['newer:jshint:all', 'newer:jscs:all'],

5151

options: {

5252

livereload: '<%%= connect.options.livereload %>'

5353

}

5454

},

5555

jsTest: {

5656

files: ['test/spec/{,*/}*.js'],

57-

tasks: ['newer:jshint:test', 'karma']

57+

tasks: ['newer:jshint:test', 'newer:jscs:test', 'karma']

5858

},<% } %><% if (compass) { %>

5959

compass: {

6060

files: ['<%%= yeoman.app %>/styles/{,*/}*.{scss,sass}'],

@@ -131,7 +131,7 @@ module.exports = function (grunt) {

131131

}

132132

},

133133134-

// Make sure code styles are up to par and there are no obvious mistakes

134+

// Make sure there are no obvious mistakes

135135

jshint: {

136136

options: {

137137

jshintrc: '.jshintrc',

@@ -151,7 +151,24 @@ module.exports = function (grunt) {

151151

}<% } %>

152152

},

153153154-

// Empties folders to start fresh

154+

<% if (!coffee) { %>// Make sure code styles are up to par

155+

jscs: {

156+

options: {

157+

config: '.jscsrc',

158+

verbose: true

159+

},

160+

all: {

161+

src: [

162+

'Gruntfile.js',

163+

'<%%= yeoman.app %>/scripts/{,*/}*.js'

164+

]

165+

},

166+

test: {

167+

src: ['test/spec/{,*/}*.js']

168+

}

169+

},

170+171+

<% } %>// Empties folders to start fresh

155172

clean: {

156173

dist: {

157174

files: [{

@@ -556,7 +573,8 @@ module.exports = function (grunt) {

556573

]);

557574558575

grunt.registerTask('default', [

559-

'newer:jshint',

576+

'newer:jshint',<% if (!coffee) { %>

577+

'newer:jscs',<% } %>

560578

'test',

561579

'build'

562580

]);