From 18c7ff5b1358b19ce2bb8618556bc17ccfdbb2e7 Mon Sep 17 00:00:00 2001 From: VisualSJ Date: Tue, 28 Jun 2016 14:36:04 +0800 Subject: [PATCH] Missing a file (engine-extends-entry.js) --- gulp/tasks/test.js | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/gulp/tasks/test.js b/gulp/tasks/test.js index b29949e298..1cd9bbb853 100644 --- a/gulp/tasks/test.js +++ b/gulp/tasks/test.js @@ -40,27 +40,18 @@ const Utils = require('./utils'); exports.build = function (sourceFile, outputFile, callback) { var jsEntryEditorExtends = '../editor/test-utils/engine-extends-entry.js'; + if (Fs.existsSync(jsEntryEditorExtends)) { + sourceFile = [sourceFile, jsEntryEditorExtends] + } + var bundler = Utils.createBundler(sourceFile); var engine = bundler.bundle() .on('error', HandleErrors.handler) .pipe(HandleErrors()) .pipe(Source(Path.basename(outputFile))) .pipe(Buffer()) - .pipe(Gulp.dest(Path.dirname(outputFile))); - - if (Fs.existsSync(jsEntryEditorExtends)) { - var editorExtends = Utils.createBundler(jsEntryEditorExtends) - .bundle() - .on('error', HandleErrors.handler) - .pipe(HandleErrors()) - .pipe(Source(Path.basename(jsEntryEditorExtends))) - .pipe(Buffer()) - .pipe(Gulp.dest(Path.dirname(outputFile))); - EventStream.merge(engine, editorExtends) + .pipe(Gulp.dest(Path.dirname(outputFile))) .on('end', callback); - } else { - engine.on('end', callback); - } }; exports.clean = function (list, callback) {