File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -258,6 +258,24 @@ gulp.task('mixin', function () {
258258 . pipe ( gulp . dest ( '.' ) ) ;
259259} ) ;
260260
261- const build = path . join ( __dirname , 'build' ) ;
262- glob . sync ( 'gulpfile.*.js' , { cwd : build } )
263- . forEach ( f => require ( `./build/${ f } ` ) ) ;
261+ var ALL_EDITOR_TASKS = [
262+ 'clean-optimized-editor' ,
263+ 'optimize-editor' ,
264+ 'clean-minified-editor' ,
265+ 'minify-editor' ,
266+ 'clean-editor-distro' ,
267+ 'editor-distro' ,
268+ 'analyze-editor-distro'
269+ ] ;
270+ var runningEditorTasks = process . argv . slice ( 2 ) . every ( function ( arg ) {
271+ return ( ALL_EDITOR_TASKS . indexOf ( arg ) !== - 1 ) ;
272+ } ) ;
273+
274+ if ( runningEditorTasks ) {
275+ require ( `./build/gulpfile.editor` ) ;
276+ } else {
277+ // Load all the gulpfiles only if running tasks other than the editor tasks
278+ const build = path . join ( __dirname , 'build' ) ;
279+ glob . sync ( 'gulpfile.*.js' , { cwd : build } )
280+ . forEach ( f => require ( `./build/${ f } ` ) ) ;
281+ }
You can’t perform that action at this time.
0 commit comments