feat(gen): add jscs · yeoman/generator-angular@f407573
@@ -47,14 +47,14 @@ module.exports = function (grunt) {
4747},<% } else { %>
4848js: {
4949files: ['<%%= yeoman.app %>/scripts/{,*/}*.js'],
50-tasks: ['newer:jshint:all'],
50+tasks: ['newer:jshint:all', 'newer:jscs:all'],
5151options: {
5252livereload: '<%%= connect.options.livereload %>'
5353}
5454},
5555jsTest: {
5656files: ['test/spec/{,*/}*.js'],
57-tasks: ['newer:jshint:test', 'karma']
57+tasks: ['newer:jshint:test', 'newer:jscs:test', 'karma']
5858},<% } %><% if (compass) { %>
5959compass: {
6060files: ['<%%= 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: {
136136options: {
137137jshintrc: '.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: {
156173dist: {
157174files: [{
@@ -556,7 +573,8 @@ module.exports = function (grunt) {
556573]);
557574558575grunt.registerTask('default', [
559-'newer:jshint',
576+'newer:jshint',<% if (!coffee) { %>
577+'newer:jscs',<% } %>
560578'test',
561579'build'
562580 ]);