@@ -199,32 +199,19 @@ gulp.task('env:prod', () => {
199
199
********************/
200
200
201
201
gulp.task('inject', cb => {
202
- runSequence ( [ 'inject:css' < % if ( ! filters . css ) { % > , 'inject:<% = styleExt %>'< % } % > ] , cb ) ;
202
+ runSequence ( [ 'inject:<% = styleExt %>' ] , cb ) ;
203
203
} );
204
204
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
-
218
205
gulp.task('inject:< %= styleExt % > ', () => {
219
206
return gulp . src ( paths . client . mainStyle )
220
207
. pipe ( plugins . inject (
221
208
gulp . src ( _ . union ( paths . client . styles , [ '!' + paths . client . mainStyle ] ) , { read : false } )
222
209
. pipe ( plugins . sort ( ) ) ,
223
210
{
224
- < % _ if ( filters . stylus ) { _ % >
225
- starttag : '/* inject:styl */' ,
211
+ < % _ if ( filters . stylus || filters . css ) { - % >
212
+ starttag : '/* inject:<%= styleExt %> */' ,
226
213
endtag : '/* endinject */' ,
227
- < % _ } _ % >
214
+ < % _ } - % >
228
215
transform: (filepath) => {
229
216
let newPath = filepath
230
217
. replace ( `/${ clientPath } /app/` , '' )
@@ -235,7 +222,7 @@ gulp.task('inject:<%= styleExt %>', () => {
235
222
}
236
223
} ) )
237
224
. pipe ( gulp . dest ( `${ clientPath } /app` ) ) ;
238
- } ) ; < % } % >
225
+ } ) ;
239
226
240
227
gulp . task ( 'webpack :dev ', function ( ) {
241
228
const webpackDevConfig = makeWebpackConfig ( { DEV : true } ) ;
0 commit comments