|
@@ -280,13 +280,7 @@ var buildExternalLibrary = function (library, settings, watch) {
|
|
sourceRoot: (filePath) => {
|
|
sourceRoot: (filePath) => {
|
|
return '';
|
|
return '';
|
|
}
|
|
}
|
|
- }));
|
|
|
|
-
|
|
|
|
- if (library.buildAsModule) {
|
|
|
|
- dev = dev.pipe(addModuleExports(library.moduleDeclaration, true))
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- dev = dev.pipe(gulp.dest(settings.build.srcOutputDirectory));
|
|
|
|
|
|
+ })).pipe(gulp.dest(settings.build.srcOutputDirectory));
|
|
|
|
|
|
var outputDirectory = config.build.outputDirectory + settings.build.distOutputDirectory;
|
|
var outputDirectory = config.build.outputDirectory + settings.build.distOutputDirectory;
|
|
var css = gulp.src(library.sassFiles || [])
|
|
var css = gulp.src(library.sassFiles || [])
|
|
@@ -298,29 +292,39 @@ var buildExternalLibrary = function (library, settings, watch) {
|
|
return merge2([shader, includeShader, dev, css]);
|
|
return merge2([shader, includeShader, dev, css]);
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- if (library.bundle) {
|
|
|
|
|
|
+ /*if (library.bundle) {
|
|
// Don't remove extends and decorate functions
|
|
// Don't remove extends and decorate functions
|
|
var code = merge2([tsProcess.js, shader, includeShader])
|
|
var code = merge2([tsProcess.js, shader, includeShader])
|
|
- .pipe(concat(library.output))
|
|
|
|
- .pipe(gulp.dest(outputDirectory))
|
|
|
|
- .pipe(cleants())
|
|
|
|
- .pipe(rename({ extname: ".min.js" }))
|
|
|
|
- .pipe(uglify())
|
|
|
|
- .pipe(optimisejs())
|
|
|
|
- .pipe(gulp.dest(outputDirectory));
|
|
|
|
- } else {
|
|
|
|
- var code = merge2([tsProcess.js, shader, includeShader])
|
|
|
|
- .pipe(concat(library.output))
|
|
|
|
- .pipe(gulp.dest(outputDirectory))
|
|
|
|
|
|
+ .pipe(concat(library.output));
|
|
|
|
+
|
|
|
|
+ if (library.buildAsModule) {
|
|
|
|
+ code = code.pipe(addModuleExports(library.moduleDeclaration, true))
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ code.pipe(gulp.dest(outputDirectory))
|
|
.pipe(cleants())
|
|
.pipe(cleants())
|
|
- .pipe(replace(extendsSearchRegex, ""))
|
|
|
|
- .pipe(replace(decorateSearchRegex, ""))
|
|
|
|
.pipe(rename({ extname: ".min.js" }))
|
|
.pipe(rename({ extname: ".min.js" }))
|
|
.pipe(uglify())
|
|
.pipe(uglify())
|
|
.pipe(optimisejs())
|
|
.pipe(optimisejs())
|
|
.pipe(gulp.dest(outputDirectory));
|
|
.pipe(gulp.dest(outputDirectory));
|
|
|
|
+ } else {*/
|
|
|
|
+ var code = merge2([tsProcess.js, shader, includeShader])
|
|
|
|
+ .pipe(concat(library.output))
|
|
|
|
+
|
|
|
|
+ if (library.buildAsModule) {
|
|
|
|
+ code = code.pipe(addModuleExports(library.moduleDeclaration, true))
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ code = code.pipe(gulp.dest(outputDirectory))
|
|
|
|
+ .pipe(cleants())
|
|
|
|
+ .pipe(replace(extendsSearchRegex, ""))
|
|
|
|
+ .pipe(replace(decorateSearchRegex, ""))
|
|
|
|
+ .pipe(rename({ extname: ".min.js" }))
|
|
|
|
+ .pipe(uglify())
|
|
|
|
+ .pipe(optimisejs())
|
|
|
|
+ .pipe(gulp.dest(outputDirectory));
|
|
|
|
+ /*}*/
|
|
|
|
+
|
|
var dts = tsProcess.dts
|
|
var dts = tsProcess.dts
|
|
.pipe(concat(library.output))
|
|
.pipe(concat(library.output))
|
|
.pipe(replace(referenceSearchRegex, ""))
|
|
.pipe(replace(referenceSearchRegex, ""))
|