@@ -199,32 +199,19 @@ gulp.task('env:prod', () => {
199199 ********************/
200200
201201gulp.task('inject', cb => {
202- runSequence ( [ 'inject:css' < % if ( ! filters . css ) { % > , 'inject:<% = styleExt %>'< % } % > ] , cb ) ;
202+ runSequence ( [ 'inject:<% = styleExt %>' ] , cb ) ;
203203} );
204204
205- gulp.task('inject:css', () => {
206- return gulp . src ( paths . client . mainView )
207- . pipe ( plugins . inject (
208- gulp . src ( `${ clientPath } /{app,components}/**/*.css` , { read : false } )
209- . pipe ( plugins . sort ( ) ) ,
210- {
211- starttag : '<!-- injector:css -->' ,
212- endtag : '<!-- endinjector -->' ,
213- transform : ( filepath ) => '<link rel="stylesheet" href="' + filepath . replace ( `/${ clientPath } /` , '' ) . replace ( '/.tmp/' , '' ) + '">'
214- } ) )
215- . pipe ( gulp . dest ( clientPath ) ) ;
216- } );< % if ( ! filters . css ) { % >
217-
218205gulp.task('inject:< %= styleExt % > ', () => {
219206 return gulp . src ( paths . client . mainStyle )
220207 . pipe ( plugins . inject (
221208 gulp . src ( _ . union ( paths . client . styles , [ '!' + paths . client . mainStyle ] ) , { read : false } )
222209 . pipe ( plugins . sort ( ) ) ,
223210 {
224- < % _ if ( filters . stylus ) { _ % >
225- starttag : '/* inject:styl */' ,
211+ < % _ if ( filters . stylus || filters . css ) { - % >
212+ starttag : '/* inject:<%= styleExt %> */' ,
226213 endtag : '/* endinject */' ,
227- < % _ } _ % >
214+ < % _ } - % >
228215 transform: (filepath) => {
229216 let newPath = filepath
230217 . replace ( `/${ clientPath } /app/` , '' )
@@ -235,7 +222,7 @@ gulp.task('inject:<%= styleExt %>', () => {
235222 }
236223 } ) )
237224 . pipe ( gulp . dest ( `${ clientPath } /app` ) ) ;
238- } ) ; < % } % >
225+ } ) ;
239226
240227gulp . task ( 'webpack :dev ', function ( ) {
241228 const webpackDevConfig = makeWebpackConfig ( { DEV : true } ) ;
0 commit comments