|
@@ -19,7 +19,6 @@ var dtsBundle = require('dts-bundle');
|
|
|
var through = require('through2');
|
|
|
|
|
|
// Gulp Helpers
|
|
|
-var appendSrcToVariable = require("./helpers/gulp-appendSrcToVariable");
|
|
|
var addDtsExport = require("./helpers/gulp-addDtsExport");
|
|
|
var addDecorateAndExtends = require("./helpers/gulp-decorateAndExtends");
|
|
|
var addModuleExports = require("./helpers/gulp-addModuleExports");
|
|
@@ -46,7 +45,6 @@ var workersStream;
|
|
|
|
|
|
var extendsSearchRegex = /var\s__extends[\s\S]+?\}\)\(\);/g;
|
|
|
var decorateSearchRegex = /var\s__decorate[\s\S]+?\};/g;
|
|
|
-var referenceSearchRegex = /\/\/\/ <reference.*/g;
|
|
|
|
|
|
/**
|
|
|
* TS configurations shared in the gulp file.
|
|
@@ -73,26 +71,6 @@ var tsConfig = {
|
|
|
};
|
|
|
var tsProject = typescript.createProject(tsConfig);
|
|
|
|
|
|
-var externalTsConfig = {
|
|
|
- noResolve: false,
|
|
|
- target: "ES5",
|
|
|
- declarationFiles: true,
|
|
|
- typescript: require("typescript"),
|
|
|
- experimentalDecorators: true,
|
|
|
- isolatedModules: false,
|
|
|
- noImplicitAny: true,
|
|
|
- noImplicitReturns: true,
|
|
|
- noImplicitThis: true,
|
|
|
- noUnusedLocals: true,
|
|
|
- strictNullChecks: true,
|
|
|
- types: [],
|
|
|
- lib: [
|
|
|
- "dom",
|
|
|
- "es2015.promise",
|
|
|
- "es5"
|
|
|
- ]
|
|
|
-};
|
|
|
-
|
|
|
function processDependency(kind, dependency, filesToLoad, firstLevelOnly) {
|
|
|
if (!firstLevelOnly && dependency.dependUpon) {
|
|
|
for (var i = 0; i < dependency.dependUpon.length; i++) {
|
|
@@ -302,338 +280,154 @@ gulp.task("typescript-compile", function() {
|
|
|
*/
|
|
|
gulp.task("typescript", gulp.series("typescript-compile", "buildWorker", "build"));
|
|
|
|
|
|
-/**
|
|
|
- * Helper methods to build external library (mat, post processes, ...).
|
|
|
- */
|
|
|
-var buildExternalLibraries = function(settings) {
|
|
|
- var tasks = settings.libraries.map(function(library) {
|
|
|
- return buildExternalLibrary(library, settings, false);
|
|
|
- });
|
|
|
-
|
|
|
- let mergedTasks = merge2(tasks);
|
|
|
-
|
|
|
- if (settings.build.buildAsModule) {
|
|
|
- mergedTasks.on("end", function() {
|
|
|
- //generate js file list
|
|
|
- let files = settings.libraries.filter(function(lib) {
|
|
|
- return !lib.doNotIncludeInBundle;
|
|
|
- }).map(function(lib) {
|
|
|
- return config.build.outputDirectory + settings.build.distOutputDirectory + lib.output;
|
|
|
- });
|
|
|
-
|
|
|
- var outputDirectory = config.build.outputDirectory + settings.build.distOutputDirectory;
|
|
|
-
|
|
|
- let srcTask = gulp.src(files)
|
|
|
- .pipe(concat(settings.build.outputFilename + ".js"))
|
|
|
- .pipe(replace(extendsSearchRegex, ""))
|
|
|
- .pipe(replace(decorateSearchRegex, ""))
|
|
|
- .pipe(replace(referenceSearchRegex, ""))
|
|
|
- .pipe(addDecorateAndExtends())
|
|
|
- .pipe(addModuleExports(settings.build.moduleDeclaration, { subModule: true, extendsRoot: settings.build.extendsRoot }))
|
|
|
- .pipe(gulp.dest(outputDirectory))
|
|
|
- .pipe(cleants())
|
|
|
- .pipe(rename({ extname: ".min.js" }))
|
|
|
- .pipe(uglify())
|
|
|
- .pipe(optimisejs())
|
|
|
- .pipe(gulp.dest(outputDirectory));
|
|
|
-
|
|
|
- let dtsFiles = files.map(function(filename) {
|
|
|
- return filename.replace(".js", ".d.ts");
|
|
|
- });
|
|
|
- let dtsModuleTask = gulp.src(dtsFiles)
|
|
|
- .pipe(concat(settings.build.outputFilename + ".module.d.ts"))
|
|
|
- .pipe(replace(referenceSearchRegex, ""))
|
|
|
- .pipe(addDtsExport(settings.build.moduleDeclaration, settings.build.moduleName, true, settings.build.extendsRoot, settings.build.extraTypesDependencies))
|
|
|
- .pipe(gulp.dest(outputDirectory));
|
|
|
- let dtsTask = gulp.src(dtsFiles)
|
|
|
- .pipe(concat(settings.build.outputFilename + ".d.ts"))
|
|
|
- .pipe(replace(referenceSearchRegex, ""))
|
|
|
- .pipe(gulp.dest(outputDirectory));
|
|
|
-
|
|
|
- return merge2([srcTask, dtsTask, dtsModuleTask]);
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- return mergedTasks;
|
|
|
-}
|
|
|
-
|
|
|
-var buildExternalLibrary = function(library, settings, watch) {
|
|
|
- var tsProcess;
|
|
|
- if (library.files && library.files.length) {
|
|
|
- tsProcess = gulp.src(library.files, { base: settings.build.srcOutputDirectory })
|
|
|
- .pipe(sourcemaps.init())
|
|
|
- .pipe(typescript(externalTsConfig));
|
|
|
- }
|
|
|
-
|
|
|
- let tasks = [];
|
|
|
-
|
|
|
- let shaderTask;
|
|
|
-
|
|
|
- let shadersInclueTask;
|
|
|
-
|
|
|
- if (library.shadersIncludeFiles && library.shadersIncludeFiles.length) {
|
|
|
- shadersInclueTask = gulp.src(library.shadersIncludeFiles, { base: settings.build.srcOutputDirectory })
|
|
|
- .pipe(uncommentShader())
|
|
|
- .pipe(appendSrcToVariable("BABYLON.Effect.IncludesShadersStore", includeShadersName, library.output + ".include.fx"))
|
|
|
- .pipe(gulp.dest(settings.build.srcOutputDirectory));
|
|
|
- tasks.push(shadersInclueTask);
|
|
|
- }
|
|
|
-
|
|
|
- if (library.shaderFiles && library.shaderFiles.length) {
|
|
|
- shaderTask = gulp.src(library.shaderFiles, { base: settings.build.srcOutputDirectory })
|
|
|
- .pipe(uncommentShader())
|
|
|
- .pipe(appendSrcToVariable("BABYLON.Effect.ShadersStore", shadersName, library.output + ".fx"))
|
|
|
- .pipe(gulp.dest(settings.build.srcOutputDirectory));
|
|
|
- tasks.push(shaderTask);
|
|
|
- }
|
|
|
-
|
|
|
- var dev;
|
|
|
-
|
|
|
- if (tsProcess) {
|
|
|
- dev = tsProcess.js
|
|
|
- .pipe(sourcemaps.write("./", {
|
|
|
- includeContent: false,
|
|
|
- sourceRoot: (filePath) => {
|
|
|
- return "";
|
|
|
- }
|
|
|
- })).pipe(gulp.dest(settings.build.srcOutputDirectory));
|
|
|
-
|
|
|
- tasks.push(dev);
|
|
|
- }
|
|
|
-
|
|
|
+var buildExternalLibrary = function(library, settings) {
|
|
|
var outputDirectory = config.build.outputDirectory + settings.build.distOutputDirectory;
|
|
|
|
|
|
- if (watch) {
|
|
|
- return merge2(tasks);
|
|
|
+ if (!library.webpack) {
|
|
|
+ throw "Missing Webpack configuration in " + library;
|
|
|
}
|
|
|
- else {
|
|
|
- let currentTasks = [];
|
|
|
- if (tsProcess) {
|
|
|
- currentTasks.push(tsProcess.js);
|
|
|
- }
|
|
|
- if (shaderTask) {
|
|
|
- currentTasks.push(shaderTask);
|
|
|
- }
|
|
|
- if (shadersInclueTask) {
|
|
|
- currentTasks.push(shadersInclueTask);
|
|
|
- }
|
|
|
- var code;
|
|
|
-
|
|
|
- if (currentTasks.length) {
|
|
|
- code = merge2(currentTasks)
|
|
|
- .pipe(concat(library.output));
|
|
|
- }
|
|
|
|
|
|
- if (library.buildAsModule && code) {
|
|
|
- code = code.pipe(replace(extendsSearchRegex, ""))
|
|
|
- .pipe(replace(decorateSearchRegex, ""))
|
|
|
- .pipe(addDecorateAndExtends())
|
|
|
- .pipe(addModuleExports(library.moduleDeclaration, { subModule: true, extendsRoot: library.extendsRoot }))
|
|
|
- }
|
|
|
-
|
|
|
- if (code) {
|
|
|
-
|
|
|
- code = code.pipe(gulp.dest(outputDirectory))
|
|
|
- .pipe(cleants())
|
|
|
- .pipe(rename({ extname: ".min.js" }))
|
|
|
- .pipe(uglify())
|
|
|
- .pipe(optimisejs())
|
|
|
- .pipe(gulp.dest(outputDirectory));
|
|
|
- /*}*/
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- var dts;
|
|
|
+ const sequence = [];
|
|
|
+ if (settings.build.outputs) {
|
|
|
+ settings.build.outputs.forEach(out => {
|
|
|
+ let wpConfig = require(library.webpack);
|
|
|
+ if (!out.minified) {
|
|
|
+ wpConfig.mode = "development";
|
|
|
+ }
|
|
|
|
|
|
- if (tsProcess) {
|
|
|
- dts = tsProcess.dts
|
|
|
- .pipe(concat(library.output))
|
|
|
- .pipe(replace(referenceSearchRegex, ""))
|
|
|
- .pipe(rename({ extname: ".d.ts" }))
|
|
|
- .pipe(gulp.dest(outputDirectory));
|
|
|
- }
|
|
|
+ let wpBuild = webpackStream(wpConfig, require("webpack"));
|
|
|
+
|
|
|
+ //shoud dtsBundle create the declaration?
|
|
|
+ if (settings.build.dtsBundle) {
|
|
|
+ let event = wpBuild
|
|
|
+ .pipe(through.obj(function(file, enc, cb) {
|
|
|
+ // only declaration files
|
|
|
+ const isdts = /\.d\.ts$/.test(file.path);
|
|
|
+ if (isdts) this.push(file);
|
|
|
+ cb();
|
|
|
+ }))
|
|
|
+ .pipe(gulp.dest(outputDirectory));
|
|
|
+ // dts-bundle does NOT support (gulp) streams, so files have to be saved and reloaded,
|
|
|
+ // until I fix it
|
|
|
+ event.on("end", function() {
|
|
|
+ // create the file
|
|
|
+ dtsBundle.bundle(settings.build.dtsBundle);
|
|
|
+ // prepend the needed reference
|
|
|
+ let fileLocation = path.join(path.dirname(settings.build.dtsBundle.main), settings.build.dtsBundle.out);
|
|
|
+ fs.readFile(fileLocation, function(err, data) {
|
|
|
+ if (err) throw err;
|
|
|
+ data = (settings.build.dtsBundle.prependText || "") + '\n' + data.toString();
|
|
|
+ fs.writeFileSync(fileLocation, data);
|
|
|
+ if (settings.build.processDeclaration) {
|
|
|
+ var newData = processDeclaration(data, settings.build.processDeclaration);
|
|
|
+ fs.writeFileSync(fileLocation.replace('.module', ''), newData);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
- var waitAll;
|
|
|
- let waitAllTasks = [];
|
|
|
+ let build = wpBuild
|
|
|
+ .pipe(through.obj(function(file, enc, cb) {
|
|
|
+ // only pipe js files
|
|
|
+ const isJs = /\.js$/.test(file.path);
|
|
|
+ if (isJs) this.push(file);
|
|
|
+ cb();
|
|
|
+ }))
|
|
|
+ .pipe(addModuleExports(library.moduleDeclaration, { subModule: false, extendsRoot: false, externalUsingBabylon: true, noBabylonInit: library.babylonIncluded }));
|
|
|
+
|
|
|
+ function processDestination(dest) {
|
|
|
+ var outputDirectory = config.build.outputDirectory + dest.outputDirectory;
|
|
|
+ build = build
|
|
|
+ .pipe(rename(dest.filename.replace(".js", library.noBundleInName ? '.js' : ".bundle.js")))
|
|
|
+ .pipe(gulp.dest(outputDirectory));
|
|
|
+
|
|
|
+ if (library.babylonIncluded && dest.addBabylonDeclaration) {
|
|
|
+ // include the babylon declaration
|
|
|
+ if (dest.addBabylonDeclaration === true) {
|
|
|
+ dest.addBabylonDeclaration = [config.build.declarationFilename];
|
|
|
+ }
|
|
|
+ var decsToAdd = dest.addBabylonDeclaration.map(function(dec) {
|
|
|
+ return config.build.outputDirectory + '/' + dec;
|
|
|
+ });
|
|
|
+ sequence.unshift(gulp.src(decsToAdd)
|
|
|
+ .pipe(rename(function(path) {
|
|
|
+ path.dirname = '';
|
|
|
+ }))
|
|
|
+ .pipe(gulp.dest(outputDirectory)))
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
+ out.destinations.forEach(dest => {
|
|
|
+ processDestination(dest);
|
|
|
+ });
|
|
|
|
|
|
- if (dev) {
|
|
|
- waitAllTasks.push(dev);
|
|
|
- }
|
|
|
+ sequence.push(build);
|
|
|
|
|
|
- if (code) {
|
|
|
- waitAllTasks.push(code);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ var wpConfig;
|
|
|
+ if (library.entry) {
|
|
|
+ wpConfig = require(settings.build.webpack);
|
|
|
+ wpConfig.entry = {
|
|
|
+ 'main': path.resolve(wpConfig.context, library.entry),
|
|
|
+ };
|
|
|
+ wpConfig.output.filename = library.output;
|
|
|
}
|
|
|
-
|
|
|
- if (dts) {
|
|
|
- waitAllTasks.push(dts);
|
|
|
+ else {
|
|
|
+ wpConfig = require(library.webpack);
|
|
|
}
|
|
|
|
|
|
- if (library.buildAsModule && tsProcess) {
|
|
|
- var dts2 = tsProcess.dts
|
|
|
- .pipe(concat(library.output))
|
|
|
- .pipe(replace(referenceSearchRegex, ""))
|
|
|
- .pipe(addDtsExport(library.moduleDeclaration, library.moduleName, true, library.extendsRoot, config.build.extraTypesDependencies))
|
|
|
- .pipe(rename({ extname: ".module.d.ts" }))
|
|
|
- .pipe(gulp.dest(outputDirectory));
|
|
|
- waitAllTasks.push(dts2);
|
|
|
- }
|
|
|
- if (waitAllTasks.length) {
|
|
|
- waitAll = merge2(waitAllTasks);
|
|
|
- }
|
|
|
+ let wpBuild = webpackStream(wpConfig, webpack);
|
|
|
|
|
|
- if (library.webpack) {
|
|
|
- let sequence = [];
|
|
|
- if (waitAll) {
|
|
|
- sequence.push(waitAll);
|
|
|
- }
|
|
|
+ let buildEvent = wpBuild.pipe(gulp.dest(outputDirectory));
|
|
|
+ sequence.push(buildEvent);
|
|
|
|
|
|
- if (settings.build.outputs) {
|
|
|
+ // Generate unminified
|
|
|
+ wpConfig.mode = "development";
|
|
|
+ wpConfig.output.filename = wpConfig.output.filename.replace(".min", "");
|
|
|
|
|
|
- settings.build.outputs.forEach(out => {
|
|
|
- let wpConfig = require(library.webpack);
|
|
|
- if (!out.minified) {
|
|
|
- wpConfig.mode = "development";
|
|
|
- }
|
|
|
+ wpBuild = webpackStream(wpConfig, webpack);
|
|
|
|
|
|
- let wpBuild = webpackStream(wpConfig, require("webpack"));
|
|
|
+ let buildEvent2 = wpBuild.pipe(gulp.dest(outputDirectory));
|
|
|
+ sequence.push(buildEvent2);
|
|
|
|
|
|
- //shoud dtsBundle create the declaration?
|
|
|
+ if (library.isMain) {
|
|
|
+ if (settings.build.dtsBundle || settings.build.processDeclaration) {
|
|
|
+ buildEvent.on("end", function() {
|
|
|
if (settings.build.dtsBundle) {
|
|
|
- let event = wpBuild
|
|
|
- .pipe(through.obj(function(file, enc, cb) {
|
|
|
- // only declaration files
|
|
|
- const isdts = /\.d\.ts$/.test(file.path);
|
|
|
- if (isdts) this.push(file);
|
|
|
- cb();
|
|
|
- }))
|
|
|
- .pipe(gulp.dest(outputDirectory));
|
|
|
- // dts-bundle does NOT support (gulp) streams, so files have to be saved and reloaded,
|
|
|
- // until I fix it
|
|
|
- event.on("end", function() {
|
|
|
- // create the file
|
|
|
- dtsBundle.bundle(settings.build.dtsBundle);
|
|
|
- // prepend the needed reference
|
|
|
- let fileLocation = path.join(path.dirname(settings.build.dtsBundle.main), settings.build.dtsBundle.out);
|
|
|
- fs.readFile(fileLocation, function(err, data) {
|
|
|
- if (err) throw err;
|
|
|
- data = (settings.build.dtsBundle.prependText || "") + '\n' + data.toString();
|
|
|
- fs.writeFileSync(fileLocation, data);
|
|
|
- if (settings.build.processDeclaration) {
|
|
|
- var newData = processDeclaration(data, settings.build.processDeclaration);
|
|
|
- fs.writeFileSync(fileLocation.replace('.module', ''), newData);
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
+ dtsBundle.bundle(settings.build.dtsBundle);
|
|
|
}
|
|
|
|
|
|
- let build = wpBuild
|
|
|
- .pipe(through.obj(function(file, enc, cb) {
|
|
|
- // only pipe js files
|
|
|
- const isJs = /\.js$/.test(file.path);
|
|
|
- if (isJs) this.push(file);
|
|
|
- cb();
|
|
|
- }))
|
|
|
- .pipe(addModuleExports(library.moduleDeclaration, { subModule: false, extendsRoot: false, externalUsingBabylon: true, noBabylonInit: library.babylonIncluded }));
|
|
|
-
|
|
|
- function processDestination(dest) {
|
|
|
- var outputDirectory = config.build.outputDirectory + dest.outputDirectory;
|
|
|
- build = build
|
|
|
- .pipe(rename(dest.filename.replace(".js", library.noBundleInName ? '.js' : ".bundle.js")))
|
|
|
- .pipe(gulp.dest(outputDirectory));
|
|
|
-
|
|
|
- if (library.babylonIncluded && dest.addBabylonDeclaration) {
|
|
|
- // include the babylon declaration
|
|
|
- if (dest.addBabylonDeclaration === true) {
|
|
|
- dest.addBabylonDeclaration = [config.build.declarationFilename];
|
|
|
- }
|
|
|
- var decsToAdd = dest.addBabylonDeclaration.map(function(dec) {
|
|
|
- return config.build.outputDirectory + '/' + dec;
|
|
|
- });
|
|
|
- sequence.unshift(gulp.src(decsToAdd)
|
|
|
- .pipe(rename(function(path) {
|
|
|
- path.dirname = '';
|
|
|
- }))
|
|
|
- .pipe(gulp.dest(outputDirectory)))
|
|
|
- }
|
|
|
- }
|
|
|
+ if (settings.build.processDeclaration) {
|
|
|
+ let fileLocation = path.join(outputDirectory, settings.build.processDeclaration.filename);
|
|
|
+ fs.readFile(fileLocation, function(err, data) {
|
|
|
+ if (err) throw err;
|
|
|
|
|
|
- out.destinations.forEach(dest => {
|
|
|
- processDestination(dest);
|
|
|
- });
|
|
|
-
|
|
|
- sequence.push(build);
|
|
|
-
|
|
|
- });
|
|
|
- } else {
|
|
|
- var wpConfig;
|
|
|
- if (library.entry) {
|
|
|
- wpConfig = require(settings.build.webpack);
|
|
|
- wpConfig.entry = {
|
|
|
- 'main': path.resolve(wpConfig.context, library.entry),
|
|
|
- };
|
|
|
- wpConfig.output.filename = library.output;
|
|
|
- }
|
|
|
- else {
|
|
|
- wpConfig = require(library.webpack);
|
|
|
- }
|
|
|
+ // For Raanan, litteral import hack TO BETTER INTEGRATE
|
|
|
+ data = data + "";
|
|
|
+ data = data.replace('import "../sass/main.scss";', "");
|
|
|
|
|
|
- let wpBuild = webpackStream(wpConfig, webpack);
|
|
|
-
|
|
|
- let buildEvent = wpBuild.pipe(gulp.dest(outputDirectory));
|
|
|
- sequence.push(buildEvent);
|
|
|
-
|
|
|
- // Generate unminified
|
|
|
- wpConfig.mode = "development";
|
|
|
- wpConfig.output.filename = wpConfig.output.filename.replace(".min", "");
|
|
|
-
|
|
|
- wpBuild = webpackStream(wpConfig, webpack);
|
|
|
-
|
|
|
- let buildEvent2 = wpBuild.pipe(gulp.dest(outputDirectory));
|
|
|
- sequence.push(buildEvent2);
|
|
|
-
|
|
|
- if (library.isMain) {
|
|
|
- if (settings.build.dtsBundle || settings.build.processDeclaration) {
|
|
|
- buildEvent.on("end", function() {
|
|
|
- if (settings.build.dtsBundle) {
|
|
|
- dtsBundle.bundle(settings.build.dtsBundle);
|
|
|
- }
|
|
|
-
|
|
|
- if (settings.build.processDeclaration) {
|
|
|
- let fileLocation = path.join(outputDirectory, settings.build.processDeclaration.filename);
|
|
|
- fs.readFile(fileLocation, function(err, data) {
|
|
|
- if (err) throw err;
|
|
|
-
|
|
|
- // For Raanan, litteral import hack TO BETTER INTEGRATE
|
|
|
- data = data + "";
|
|
|
- data = data.replace('import "../sass/main.scss";', "");
|
|
|
-
|
|
|
- var newData = processDeclaration(data, settings.build.processDeclaration);
|
|
|
- fs.writeFileSync(fileLocation.replace('.module', ''), newData);
|
|
|
- //legacy module support
|
|
|
- fs.writeFileSync(fileLocation, data + "\n" + newData);
|
|
|
- });
|
|
|
- }
|
|
|
+ var newData = processDeclaration(data, settings.build.processDeclaration);
|
|
|
+ fs.writeFileSync(fileLocation.replace('.module', ''), newData);
|
|
|
+ //legacy module support
|
|
|
+ fs.writeFileSync(fileLocation, data + "\n" + newData);
|
|
|
});
|
|
|
}
|
|
|
- }
|
|
|
+ });
|
|
|
}
|
|
|
-
|
|
|
- return merge2(sequence);
|
|
|
- }
|
|
|
- else {
|
|
|
- return waitAll || Promise.resolve();
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ return merge2(sequence);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* Dynamic module creation In Serie for WebPack leaks.
|
|
|
*/
|
|
|
-function buildExternalLibrariesInSeries(settings) {
|
|
|
+function buildExternalLibraries(settings) {
|
|
|
var tasks = settings.libraries.map(function(library) {
|
|
|
var build = function(cb) {
|
|
|
- return buildExternalLibrary(library, settings, false);
|
|
|
+ return buildExternalLibrary(library, settings);
|
|
|
}
|
|
|
return build;
|
|
|
});
|
|
@@ -645,16 +439,7 @@ function buildExternalLibrariesInSeries(settings) {
|
|
|
* Dynamic module creation.
|
|
|
*/
|
|
|
config.modules.map(function(module) {
|
|
|
- // New Way
|
|
|
- if (!config[module].buildAsModule) {
|
|
|
- gulp.task(module, buildExternalLibrariesInSeries(config[module]));
|
|
|
- }
|
|
|
- // Soon To Be Gone
|
|
|
- else {
|
|
|
- gulp.task(module, function() {
|
|
|
- return buildExternalLibraries(config[module]);
|
|
|
- });
|
|
|
- }
|
|
|
+ gulp.task(module, buildExternalLibraries(config[module]));
|
|
|
});
|
|
|
|
|
|
/**
|