|
@@ -284,16 +284,28 @@ var buildExternalLibrary = function (library, settings, watch) {
|
|
return merge2([shader, includeShader, dev, css]);
|
|
return merge2([shader, includeShader, dev, css]);
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- var code = merge2([tsProcess.js, shader, includeShader])
|
|
|
|
- .pipe(concat(library.output))
|
|
|
|
- .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));
|
|
|
|
|
|
+ if (library.bundle) {
|
|
|
|
+ // Don't remove extends and decorate functions
|
|
|
|
+ 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(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))
|
|
@@ -418,7 +430,7 @@ gulp.task('webserver', function () {
|
|
gulp.src('../../.').pipe(webserver({
|
|
gulp.src('../../.').pipe(webserver({
|
|
port: 1338,
|
|
port: 1338,
|
|
livereload: false
|
|
livereload: false
|
|
- }));
|
|
|
|
|
|
+ }));
|
|
});
|
|
});
|
|
|
|
|
|
/**
|
|
/**
|