@@ -108,23 +108,17 @@ function sortModulesFirst(a, b) {
108
108
* Reusable pipelines
109
109
********************/
110
110
111
- let lintClientScripts = lazypipe ( ) < % if ( filters . coffee ) { % >
112
- . pipe ( plugins . coffeelint )
113
- . pipe ( plugins . coffeelint . reporter ) ; < % } else { % >
111
+ let lintClientScripts = lazypipe ( )
114
112
. pipe ( plugins . jshint , `${ clientPath } /.jshintrc` )
115
- . pipe ( plugins . jshint . reporter , 'jshint-stylish' ) ; < % } % >
113
+ . pipe ( plugins . jshint . reporter , 'jshint-stylish' ) ;
116
114
117
- let lintServerScripts = lazypipe ( ) < % if ( filters . coffee ) { % >
118
- . pipe ( plugins . coffeelint )
119
- . pipe ( plugins . coffeelint . reporter ) ; < % } else { % >
115
+ let lintServerScripts = lazypipe ( )
120
116
. pipe ( plugins . jshint , `${ serverPath } /.jshintrc` )
121
- . pipe ( plugins . jshint . reporter , 'jshint-stylish' ) ; < % } % >
117
+ . pipe ( plugins . jshint . reporter , 'jshint-stylish' ) ;
122
118
123
- let lintServerTestScripts = lazypipe ( ) < % if ( filters . coffee ) { % >
124
- . pipe ( plugins . coffeelint )
125
- . pipe ( plugins . coffeelint . reporter ) ; < % } else { % >
119
+ let lintServerTestScripts = lazypipe ( )
126
120
. pipe ( plugins . jshint , `${ serverPath } /.jshintrc-spec` )
127
- . pipe ( plugins . jshint . reporter , 'jshint-stylish' ) ; < % } % >
121
+ . pipe ( plugins . jshint . reporter , 'jshint-stylish' ) ;
128
122
129
123
let styles = lazypipe ( )
130
124
. pipe ( plugins . sourcemaps . init ) < % if ( filters . stylus ) { % >
@@ -135,23 +129,21 @@ let styles = lazypipe()
135
129
. pipe ( plugins . sass ) < % } if ( filters . less ) { % >
136
130
. pipe ( plugins . less ) < % } % >
137
131
. pipe ( plugins . autoprefixer , { browsers : [ 'last 1 version' ] } )
138
- . pipe ( plugins . sourcemaps . write , '.' ) ; < % if ( filters . babel || filters . coffee ) { % >
132
+ . pipe ( plugins . sourcemaps . write , '.' ) ;
139
133
140
134
let transpileServer = lazypipe ( )
141
135
. pipe ( plugins . sourcemaps . init ) < % if ( filters . babel ) { % >
142
136
. pipe ( plugins . babel , {
143
137
optional : [ 'runtime' ]
144
- } ) < % } else { % >
145
- . pipe ( plugins . coffee , { bare : true } ) < % } % >
138
+ } ) < % } % >
146
139
. pipe ( plugins . sourcemaps . write , '.' ) ;
147
140
148
141
let transpileClient = lazypipe ( )
149
142
. pipe ( plugins . sourcemaps . init ) < % if ( filters . babel ) { % >
150
143
. pipe ( plugins . babel , {
151
144
optional : [ 'es7.classProperties' ]
152
- } ) < % } else { % >
153
- . pipe ( plugins . coffee , { bare : true } ) < % } % >
154
- . pipe ( plugins . sourcemaps . write , '.' ) ; < % } % >
145
+ } ) < % } % >
146
+ . pipe ( plugins . sourcemaps . write , '.' ) ;
155
147
156
148
let mocha = lazypipe ( )
157
149
. pipe ( plugins . mocha , {
@@ -259,13 +251,13 @@ gulp.task('styles', () => {
259
251
return gulp . src ( paths . client . mainStyle )
260
252
. pipe ( styles ( ) )
261
253
. pipe ( gulp . dest ( '.tmp/app' ) ) ;
262
- } ) ; < % if ( filters . babel || filters . coffee ) { % >
254
+ } ) ;
263
255
264
256
gulp . task ( 'transpile:client' , ( ) => {
265
257
return gulp . src ( paths . client . scripts )
266
258
. pipe ( transpileClient ( ) )
267
259
. pipe ( gulp . dest ( '.tmp' ) ) ;
268
- } ) ; < % } % >
260
+ } ) ;
269
261
270
262
gulp . task ( 'transpile:server' , ( ) => {
271
263
return gulp . src ( _ . union ( paths . server . scripts , paths . server . json ) )
@@ -342,9 +334,9 @@ gulp.task('watch', () => {
342
334
. pipe ( plugins . livereload ( ) ) ;
343
335
344
336
plugins . watch ( paths . client . scripts ) //['inject:js']
345
- . pipe ( plugins . plumber ( ) ) < % if ( filters . babel || filters . coffee ) { % >
337
+ . pipe ( plugins . plumber ( ) )
346
338
. pipe ( transpileClient ( ) )
347
- . pipe ( gulp . dest ( '.tmp' ) ) < % } % >
339
+ . pipe ( gulp . dest ( '.tmp' ) )
348
340
. pipe ( plugins . livereload ( ) ) ;
349
341
350
342
plugins . watch ( _ . union ( paths . server . scripts , testFiles ) )
@@ -358,9 +350,8 @@ gulp.task('watch', () => {
358
350
gulp . task ( 'serve' , cb => {
359
351
runSequence ( [ 'clean:tmp' , 'constant' ] ,
360
352
[ 'lint:scripts' , 'inject' < % if ( filters . jade ) { % > , 'jade' < % } % > ] ,
361
- [ 'wiredep:client' ] , < % if ( filters . babel || filters . coffee ) { % >
362
- [ 'transpile:client' , 'styles' ] , < % } else { % >
363
- 'styles' , < % } % >
353
+ [ 'wiredep:client' ] ,
354
+ [ 'transpile:client' , 'styles' ] ,
364
355
[ 'start:server' , 'start:client' ] ,
365
356
'watch' ,
366
357
cb ) ;
0 commit comments