Skip to content

Commit 778e784

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

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

+4-2
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,13 @@ 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+
let matchPattern = this.$options.release ? "**/*.ts" : "**/*.d.ts";
31+
let deleteFilesFutures = allFiles.filter(file => minimatch(file, matchPattern, { nocase: true })).map(file => this.$fs.deleteFile(file));
3032
Future.wait(deleteFilesFutures);
3133

3234
shelljs.rm("-rf", path.join(tnsCoreModulesResourcePath, "node_modules"));
3335

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

0 commit comments

Comments
 (0)