@@ -26,15 +26,19 @@ module.exports = function (grunt) {
26
26
} ,
27
27
28
28
// Watches files for changes and runs tasks based on the changed files
29
- watch : {
29
+ watch : { < % if ( coffee ) { % >
30
30
coffee : {
31
- files : [ '<%%= yeoman.app %>/scripts/{,*/}*.coffee' ] ,
31
+ files : [ '<%%= yeoman.app %>/scripts/{,*/}*.{ coffee,litcoffee,coffee.md} ' ] ,
32
32
tasks : [ 'newer:coffee:dist' ]
33
33
} ,
34
34
coffeeTest : {
35
- files : [ 'test/spec/{,*/}*.{coffee,js }' ] ,
35
+ files : [ 'test/spec/{,*/}*.{coffee,litcoffee,coffee.md }' ] ,
36
36
tasks : [ 'newer:coffee:test' , 'karma' ]
37
- } , < % if ( compassBootstrap ) { % >
37
+ } , < % } else { % >
38
+ jsTest : {
39
+ files : [ 'test/spec/{,*/}*.js' ] ,
40
+ tasks : [ 'karma' ]
41
+ } , < % } % > < % if ( compassBootstrap ) { % >
38
42
compass : {
39
43
files : [ '<%%= yeoman.app %>/styles/{,*/}*.{scss,sass}' ] ,
40
44
tasks : [ 'compass:server' , 'autoprefixer' ]
@@ -52,9 +56,9 @@ module.exports = function (grunt) {
52
56
} ,
53
57
files : [
54
58
'<%%= yeoman.app %>/{,*/}*.html' ,
55
- '.tmp/styles/{,*/}*.css' ,
59
+ '.tmp/styles/{,*/}*.css' , < % if ( ! coffee ) { % >
56
60
'{.tmp,<%%= yeoman.app %>}/scripts/{,*/}*.js' ,
57
- '<%%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}'
61
+ < % } % > '< % %= yeoman . app % > /images/{ , * / } *.{ png , jpg , jpeg , gif , webp , svg } '
58
62
]
59
63
}
60
64
} ,
@@ -100,8 +104,9 @@ module.exports = function (grunt) {
100
104
reporter : require ( 'jshint-stylish' )
101
105
} ,
102
106
all : [
103
- 'Gruntfile.js' ,
104
- '<%%= yeoman.app %>/scripts/{,*/}*.js'
107
+ 'Gruntfile.js' < % if ( ! coffee ) { % > ,
108
+ '<%%= yeoman.app %>/scripts/{,*/}*.js' ,
109
+ 'test/spec/{,*/}*.js' < % } % >
105
110
]
106
111
} ,
107
112
@@ -122,7 +127,9 @@ module.exports = function (grunt) {
122
127
123
128
// Add vendor prefixed styles
124
129
autoprefixer: {
125
- options : [ 'last 1 version' ] ,
130
+ options : {
131
+ browsers : [ 'last 1 version' ]
132
+ } ,
126
133
dist : {
127
134
files : [ {
128
135
expand : true ,
@@ -133,6 +140,7 @@ module.exports = function (grunt) {
133
140
}
134
141
} ,
135
142
143
+ < % if ( coffee ) { % >
136
144
// Compiles CoffeeScript to JavaScript
137
145
coffee: {
138
146
options : {
@@ -157,8 +165,9 @@ module.exports = function (grunt) {
157
165
ext : '.js'
158
166
} ]
159
167
}
160
- } , < % if ( compassBootstrap ) { % >
168
+ } ,< % } % >
161
169
170
+ < % if ( compassBootstrap ) { % >
162
171
// Compiles Sass to CSS and generates necessary files if requested
163
172
compass: {
164
173
options : {
@@ -167,14 +176,19 @@ module.exports = function (grunt) {
167
176
generatedImagesDir : '.tmp/images/generated' ,
168
177
imagesDir : '<%%= yeoman.app %>/images' ,
169
178
javascriptsDir : '<%%= yeoman.app %>/scripts' ,
170
- fontsDir : '<%%= yeoman.app %>/fonts' ,
179
+ fontsDir : '<%%= yeoman.app %>/styles/ fonts' ,
171
180
importPath : '<%%= yeoman.app %>/bower_components' ,
172
181
httpImagesPath : '/images' ,
173
182
httpGeneratedImagesPath : '/images/generated' ,
174
- httpFontsPath : '/fonts' ,
175
- relativeAssets : false
183
+ httpFontsPath : '/styles/fonts' ,
184
+ relativeAssets : false ,
185
+ assetCacheBuster : false
186
+ } ,
187
+ dist : {
188
+ options : {
189
+ generatedImagesDir : '<%%= yeoman.dist %>/images/generated'
190
+ }
176
191
} ,
177
- dist : { } ,
178
192
server : {
179
193
options : {
180
194
debugInfo : true
@@ -311,18 +325,18 @@ module.exports = function (grunt) {
311
325
312
326
// Run some tasks in parallel to speed up the build process
313
327
concurrent: {
314
- server : [
315
- 'coffee:dist' , < % if ( compassBootstrap ) { % >
328
+ server : [ < % if ( coffee ) { % >
329
+ 'coffee:dist' , < % } % > < % if ( compassBootstrap ) { % >
316
330
'compass:server',< % } % >
317
331
'copy:styles'
318
332
],
319
- test : [
320
- 'coffee ', < % if ( compassBootstrap ) { % >
333
+ test: [< % if ( coffee ) { % >
334
+ 'coffee',< % } % > < % if ( compassBootstrap ) { % >
321
335
'compass',< % } % >
322
336
'copy:styles'
323
337
],
324
- dist: [
325
- 'coffee',< % if ( compassBootstrap ) { % >
338
+ dist: [< % if ( coffee ) { % >
339
+ 'coffee',< % } % > < % if ( compassBootstrap ) { % >
326
340
'compass:dist',< % } % >
327
341
'copy:styles',
328
342
'imagemin',
0 commit comments