Skip to content

Commit 061804b

Browse files
author
Tsvetan Raikov
committed
Fixed: typescript files don't show in {N} debugger.
1 parent d416cce commit 061804b

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

lib/tools/node-modules/node-modules-dest-copy.ts

+10-3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export interface ILocalDependencyData extends IDependencyData {
1111
export class TnsModulesCopy {
1212
constructor(
1313
private outputRoot: string,
14+
private $options: IOptions,
1415
private $fs: IFileSystem
1516
) {
1617
}
@@ -26,12 +27,18 @@ export class TnsModulesCopy {
2627

2728
// Remove .ts files
2829
let allFiles = this.$fs.enumerateFilesInDirectorySync(tnsCoreModulesResourcePath);
29-
let deleteFilesFutures = allFiles.filter(file => minimatch(file, "**/*.ts", { nocase: true })).map(file => this.$fs.deleteFile(file));
30-
Future.wait(deleteFilesFutures);
30+
if (this.$options.release) {
31+
let deleteFilesFutures = allFiles.filter(file => minimatch(file, "**/*.ts", { nocase: true })).map(file => this.$fs.deleteFile(file));
32+
Future.wait(deleteFilesFutures);
33+
} else {
34+
let deleteFilesFutures = allFiles.filter(file => minimatch(file, "**/*.d.ts", { nocase: true })).map(file => this.$fs.deleteFile(file));
35+
Future.wait(deleteFilesFutures);
36+
}
37+
3138

3239
shelljs.rm("-rf", path.join(tnsCoreModulesResourcePath, "node_modules"));
3340

34-
// TODO: The following two lines are necessary to temporarily work around hardcoded
41+
// TODO: The following two lines are necessary to temporarily work around hardcoded
3542
// path dependencies in iOS livesync logic. Should be addressed ASAP
3643
shelljs.cp("-Rf", path.join(tnsCoreModulesResourcePath, "*"), this.outputRoot);
3744
shelljs.rm("-rf", tnsCoreModulesResourcePath);

0 commit comments

Comments
 (0)