@@ -57,98 +57,77 @@ module.exports = function (grunt) {
57
57
watch : {
58
58
injectJS : {
59
59
files : [
60
- '<%%= yeoman.client %>/{app,components}/**/*.js' ,
61
- '!<%%= yeoman.client %>/{app,components}/**/*.spec.js' ,
62
- '!<%%= yeoman.client %>/{app,components}/**/*.mock.js' ,
63
- '!<%%= yeoman.client %>/app/app.js' ] ,
60
+ '<%%= yeoman.client %>/{app,components}/**/!(*.spec|*.mock).js' ,
61
+ '!<%%= yeoman.client %>/app/app.js'
62
+ ] ,
64
63
tasks : [ < % if ( filters . babel ) { % > 'newer:babel:client' , < % } % > 'injector:scripts']
65
64
} ,
66
65
injectCss : {
67
- files : [
68
- '<%%= yeoman.client %>/{app,components}/**/*.css'
69
- ] ,
66
+ files : [ '<%%= yeoman.client %>/{app,components}/**/*.css' ] ,
70
67
tasks : [ 'injector:css' ]
71
68
} ,
72
69
mochaTest: {
73
70
files : [ 'server/**/*.spec.js' ] ,
74
71
tasks : [ 'env:test' , 'mochaTest' ]
75
72
} ,
76
73
jsTest: {
77
- files : [
78
- '<%%= yeoman.client %>/{app,components}/**/*.spec.js' ,
79
- '<%%= yeoman.client %>/{app,components}/**/*.mock.js'
80
- ] ,
74
+ files : [ '<%%= yeoman.client %>/{app,components}/**/*.{spec,mock}.js' ] ,
81
75
tasks : [ 'newer:jshint:all' , 'karma' ]
82
76
} ,< % if ( filters . stylus ) { % >
83
77
injectStylus: {
84
- files : [
85
- '<%%= yeoman.client %>/{app,components}/**/*.styl' ] ,
78
+ files : [ '<%%= yeoman.client %>/{app,components}/**/*.styl' ] ,
86
79
tasks : [ 'injector:stylus' ]
87
80
} ,
88
81
stylus: {
89
- files : [
90
- '<%%= yeoman.client %>/{app,components}/**/*.styl' ] ,
82
+ files : [ '<%%= yeoman.client %>/{app,components}/**/*.styl' ] ,
91
83
tasks : [ 'stylus' , 'autoprefixer' ]
92
84
} ,< % } if ( filters . sass ) { % >
93
85
injectSass: {
94
- files : [
95
- '<%%= yeoman.client %>/{app,components}/**/*.{scss,sass}' ] ,
86
+ files : [ '<%%= yeoman.client %>/{app,components}/**/*.{scss,sass}' ] ,
96
87
tasks : [ 'injector:sass' ]
97
88
} ,
98
89
sass: {
99
- files : [
100
- '<%%= yeoman.client %>/{app,components}/**/*.{scss,sass}' ] ,
90
+ files : [ '<%%= yeoman.client %>/{app,components}/**/*.{scss,sass}' ] ,
101
91
tasks : [ 'sass' , 'autoprefixer' ]
102
92
} ,< % } if ( filters . less ) { % >
103
93
injectLess: {
104
- files : [
105
- '<%%= yeoman.client %>/{app,components}/**/*.less' ] ,
94
+ files : [ '<%%= yeoman.client %>/{app,components}/**/*.less' ] ,
106
95
tasks : [ 'injector:less' ]
107
96
} ,
108
97
less: {
109
- files : [
110
- '<%%= yeoman.client %>/{app,components}/**/*.less' ] ,
98
+ files : [ '<%%= yeoman.client %>/{app,components}/**/*.less' ] ,
111
99
tasks : [ 'less' , 'autoprefixer' ]
112
100
} ,< % } if ( filters . jade ) { % >
113
101
jade: {
114
102
files : [
115
103
'<%%= yeoman.client %>/{app,components}/*' ,
116
- '<%%= yeoman.client %>/{app,components}/**/*.jade' ] ,
104
+ '<%%= yeoman.client %>/{app,components}/**/*.jade'
105
+ ] ,
117
106
tasks : [ 'jade' ]
118
107
} ,< % } if ( filters . coffee ) { % >
119
108
coffee: {
120
- files : [
121
- '<%%= yeoman.client %>/{app,components}/**/*.{coffee,litcoffee,coffee.md}' ,
122
- '!<%%= yeoman.client %>/{app,components}/**/*.spec.{coffee,litcoffee,coffee.md}'
123
- ] ,
109
+ files : [ '<%%= yeoman.client %>/{app,components}/**/!(*.spec).{coffee,litcoffee,coffee.md}' ] ,
124
110
tasks : [ 'newer:coffee' , 'injector:scripts' ]
125
111
} ,
126
112
coffeeTest: {
127
- files : [
128
- '<%%= yeoman.client %>/{app,components}/**/*.spec.{coffee,litcoffee,coffee.md}'
129
- ] ,
113
+ files : [ '<%%= yeoman.client %>/{app,components}/**/*.spec.{coffee,litcoffee,coffee.md}' ] ,
130
114
tasks : [ 'karma' ]
131
115
} ,< % } % >
132
116
gruntfile: {
133
117
files : [ 'Gruntfile.js' ]
134
118
} ,
135
119
livereload: {
136
120
files : [
137
- '{.tmp,<%%= yeoman.client %>}/{app,components}/**/*.css' ,
138
- '{.tmp,<%%= yeoman.client %>}/{app,components}/**/*.html' ,
139
- '{.tmp,<%%= yeoman.client %>}/{app,components}/**/*.js' ,
140
- '!{.tmp,<%%= yeoman.client %>}/{app,components}/**/*.spec.js' ,
141
- '!{.tmp,<%%= yeoman.client %>}/{app,components}/**/*.mock.js' ,
121
+ '{.tmp,<%%= yeoman.client %>}/{app,components}/**/*.{css,html}' ,
122
+ '{.tmp,<%%= yeoman.client %>}/{app,components}/**/!(*.spec|*.mock).js' ,
142
123
'<%%= yeoman.client %>/assets/images/{,*//*}*.{png,jpg,jpeg,gif,webp,svg}'
143
124
] ,
144
125
options : {
145
126
livereload : true
146
127
}
147
128
} ,
148
129
express: {
149
- files : [
150
- 'server/**/*.{js,json}'
151
- ] ,
130
+ files : [ 'server/**/*.{js,json}' ] ,
152
131
tasks : [ 'express:dev' , 'wait' ] ,
153
132
options : {
154
133
livereload : true ,
@@ -167,27 +146,17 @@ module.exports = function (grunt) {
167
146
options : {
168
147
jshintrc : 'server/.jshintrc'
169
148
} ,
170
- src : [
171
- 'server/**/*.js' ,
172
- '!server/**/*.{spec,integration}.js'
173
- ]
149
+ src : [ 'server/**/!(*.spec|*.integration).js' ]
174
150
} ,
175
151
serverTest : {
176
152
options : {
177
153
jshintrc : 'server/.jshintrc-spec'
178
154
} ,
179
155
src : [ 'server/**/*.{spec,integration}.js' ]
180
156
} ,
181
- all : [
182
- '<%%= yeoman.client %>/{app,components}/**/*.js' ,
183
- '!<%%= yeoman.client %>/{app,components}/**/*.spec.js' ,
184
- '!<%%= yeoman.client %>/{app,components}/**/*.mock.js'
185
- ] ,
157
+ all : [ '<%%= yeoman.client %>/{app,components}/**/!(*.spec|*.mock).js' ] ,
186
158
test : {
187
- src : [
188
- '<%%= yeoman.client %>/{app,components}/**/*.spec.js' ,
189
- '<%%= yeoman.client %>/{app,components}/**/*.mock.js'
190
- ]
159
+ src : [ '<%%= yeoman.client %>/{app,components}/**/*.{spec,mock}.js' ]
191
160
}
192
161
} ,
193
162
@@ -198,7 +167,6 @@ module.exports = function (grunt) {
198
167
main : {
199
168
files : {
200
169
src : [
201
- '<%%= yeoman.client %>/app/**/*.js' ,
202
170
'<%%= yeoman.client %>/app/**/*.js' ,
203
171
'server/**/*.js'
204
172
]
@@ -213,10 +181,7 @@ module.exports = function (grunt) {
213
181
dot : true ,
214
182
src : [
215
183
'.tmp' ,
216
- '<%%= yeoman.dist %>/*' ,
217
- '!<%%= yeoman.dist %>/.git*' ,
218
- '!<%%= yeoman.dist %>/.openshift' ,
219
- '!<%%= yeoman.dist %>/Procfile'
184
+ '<%%= yeoman.dist %>/**/!(.git*|.openshift|Procfile)'
220
185
]
221
186
} ]
222
187
} ,
@@ -285,8 +250,7 @@ module.exports = function (grunt) {
285
250
filerev: {
286
251
dist : {
287
252
src : [
288
- '<%%= yeoman.dist %>/client/!(bower_components)/{,*/}*.js' ,
289
- '<%%= yeoman.dist %>/client/!(bower_components)/{,*/}*.css' ,
253
+ '<%%= yeoman.dist %>/client/!(bower_components)/{,*/}*.{js,css}' ,
290
254
'<%%= yeoman.dist %>/client/assets/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}' ,
291
255
'<%%= yeoman.dist %>/client/assets/fonts/*'
292
256
]
@@ -516,11 +480,7 @@ module.exports = function (grunt) {
516
480
mocha_istanbul: {
517
481
unit : {
518
482
options : {
519
- excludes : [
520
- '**/*.spec.js' ,
521
- '**/*.mock.js' ,
522
- '**/*.integration.js'
523
- ] ,
483
+ excludes : [ '**/*.{spec,mock,integration}.js' ] ,
524
484
reporter : 'spec' ,
525
485
require : [ 'mocha.conf.js' ] ,
526
486
mask : '**/*.spec.js' ,
@@ -530,11 +490,7 @@ module.exports = function (grunt) {
530
490
} ,
531
491
integration : {
532
492
options : {
533
- excludes : [
534
- '**/*.spec.js' ,
535
- '**/*.mock.js' ,
536
- '**/*.integration.js'
537
- ] ,
493
+ excludes : [ '**/*.{spec,mock,integration}.js' ] ,
538
494
reporter : 'spec' ,
539
495
require : [ 'mocha.conf.js' ] ,
540
496
mask : '**/*.integration.js' ,
@@ -592,9 +548,7 @@ module.exports = function (grunt) {
592
548
files : [ {
593
549
expand : true ,
594
550
cwd : '<%%= yeoman.client %>' ,
595
- src : [
596
- '{app,components}/**/*.jade'
597
- ] ,
551
+ src : [ '{app,components}/**/*.jade' ] ,
598
552
dest : '.tmp' ,
599
553
ext : '.html'
600
554
} ]
@@ -611,10 +565,7 @@ module.exports = function (grunt) {
611
565
files : [ {
612
566
expand : true ,
613
567
cwd : 'client' ,
614
- src : [
615
- '{app,components}/**/*.coffee' ,
616
- '!{app,components}/**/*.spec.coffee'
617
- ] ,
568
+ src : [ '{app,components}/**/!(*.spec).coffee' ] ,
618
569
dest : '.tmp' ,
619
570
ext : '.js'
620
571
} ]
@@ -630,10 +581,7 @@ module.exports = function (grunt) {
630
581
files : [ {
631
582
expand : true ,
632
583
cwd : '<%%= yeoman.client %>' ,
633
- src : [
634
- '{app,components}/**/*.js' ,
635
- '!{app,components}/**/*.spec.js'
636
- ] ,
584
+ src : [ '{app,components}/**/!(*.spec).js' ] ,
637
585
dest : '.tmp'
638
586
} ]
639
587
}
@@ -707,11 +655,9 @@ module.exports = function (grunt) {
707
655
files : {
708
656
'<%%= yeoman.client %>/index.html' : [
709
657
[ < % if ( filters . babel ) { % >
710
- '.tmp/{app,components}/**/*.js' , < % } else { % >
711
- '{.tmp,<%%= yeoman.client %>}/{app,components}/**/*.js' , < % } % >
712
- '!{ . tmp , < % %= yeoman . client % > } /app/app.js',
713
- '!{ . tmp , < % %= yeoman . client % > } / { app , components } /**/*.spec.js',
714
- '!{ . tmp , < % %= yeoman . client % > } / { app , components } /**/*.mock.js'
658
+ '.tmp/{app,components}/**/!(*.spec|*.mock).js' , < % } else { % >
659
+ '{.tmp,<%%= yeoman.client %>}/{app,components}/**/!(*.spec|*.mock).js' , < % } % >
660
+ '!{ . tmp , < % %= yeoman . client % > } /app/app.js'
715
661
]
716
662
]
717
663
}
0 commit comments