|
@@ -463,16 +463,21 @@ var buildExternalLibrary = function (library, settings, watch) {
|
|
// dts-bundle does NOT support (gulp) streams, so files have to be saved and reloaded,
|
|
// dts-bundle does NOT support (gulp) streams, so files have to be saved and reloaded,
|
|
// until I fix it
|
|
// until I fix it
|
|
event.on("end", function () {
|
|
event.on("end", function () {
|
|
|
|
+
|
|
|
|
+ console.log(settings.build.dtsBundle);
|
|
// create the file
|
|
// create the file
|
|
dtsBundle.bundle(settings.build.dtsBundle);
|
|
dtsBundle.bundle(settings.build.dtsBundle);
|
|
// prepend the needed reference
|
|
// prepend the needed reference
|
|
let fileLocation = path.join(path.dirname(settings.build.dtsBundle.main), settings.build.dtsBundle.out);
|
|
let fileLocation = path.join(path.dirname(settings.build.dtsBundle.main), settings.build.dtsBundle.out);
|
|
|
|
+ console.log(fileLocation);
|
|
fs.readFile(fileLocation, function (err, data) {
|
|
fs.readFile(fileLocation, function (err, data) {
|
|
if (err) throw err;
|
|
if (err) throw err;
|
|
- data = settings.build.dtsBundle.prependText + '\n' + data.toString();
|
|
|
|
|
|
+ data = (settings.build.dtsBundle.prependText || "") + '\n' + data.toString();
|
|
fs.writeFile(fileLocation, data);
|
|
fs.writeFile(fileLocation, data);
|
|
- var newData = processViewerDeclaration(data);
|
|
|
|
- fs.writeFile(fileLocation.replace('.module', ''), newData);
|
|
|
|
|
|
+ if (settings.build.dtsBundle.legacyDeclaration) {
|
|
|
|
+ var newData = processViewerDeclaration(data);
|
|
|
|
+ fs.writeFile(fileLocation.replace('.module', ''), newData);
|
|
|
|
+ }
|
|
});
|
|
});
|
|
});
|
|
});
|
|
}
|
|
}
|