@@ -137,7 +137,15 @@ let styles = lazypipe()
137137 . pipe ( plugins . autoprefixer , { browsers : [ 'last 1 version' ] } )
138138 . pipe ( plugins . sourcemaps . write , '.' ) ; < % if ( filters . babel || filters . coffee ) { % >
139139
140- let transpile = lazypipe ( )
140+ let transpileServer = lazypipe ( )
141+ . pipe ( plugins . sourcemaps . init ) < % if ( filters . babel ) { % >
142+ . pipe ( plugins . babel , {
143+ optional : [ 'runtime' ]
144+ } ) < % } else { % >
145+ . pipe ( plugins . coffee , { bare : true } ) < % } % >
146+ . pipe ( plugins . sourcemaps . write , '.' ) ;
147+
148+ let transpileClient = lazypipe ( )
141149 . pipe ( plugins . sourcemaps . init ) < % if ( filters . babel ) { % >
142150 . pipe ( plugins . babel , {
143151 optional : [ 'es7.classProperties' ]
@@ -255,13 +263,13 @@ gulp.task('styles', () => {
255263
256264gulp . task ( 'transpile:client' , ( ) => {
257265 return gulp . src ( paths . client . scripts )
258- . pipe ( transpile ( ) )
266+ . pipe ( transpileClient ( ) )
259267 . pipe ( gulp . dest ( '.tmp' ) ) ;
260268} ) ; < % } % >
261269
262270gulp . task ( 'transpile:server' , ( ) => {
263271 return gulp . src ( _ . union ( paths . server . scripts , paths . server . json ) )
264- . pipe ( transpile ( ) )
272+ . pipe ( transpileServer ( ) )
265273 . pipe ( gulp . dest ( `${ paths . dist } /${ serverPath } ` ) ) ;
266274} ) ;
267275
@@ -335,7 +343,7 @@ gulp.task('watch', () => {
335343
336344 plugins . watch ( paths . client . scripts ) //['inject:js']
337345 . pipe ( plugins . plumber ( ) ) < % if ( filters . babel || filters . coffee ) { % >
338- . pipe ( transpile ( ) )
346+ . pipe ( transpileClient ( ) )
339347 . pipe ( gulp . dest ( '.tmp' ) ) < % } % >
340348 . pipe ( plugins . livereload ( ) ) ;
341349
0 commit comments