From 778e7848aa9b0aedcd1ddc5bdf2dba06b319cba9 Mon Sep 17 00:00:00 2001 From: Tsvetan Raikov Date: Mon, 7 Nov 2016 14:26:45 +0200 Subject: [PATCH] Fixed: typescript files don't show in {N} debugger. --- lib/tools/node-modules/node-modules-dest-copy.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/tools/node-modules/node-modules-dest-copy.ts b/lib/tools/node-modules/node-modules-dest-copy.ts index 897c2eebb5..7cca3e24af 100644 --- a/lib/tools/node-modules/node-modules-dest-copy.ts +++ b/lib/tools/node-modules/node-modules-dest-copy.ts @@ -11,6 +11,7 @@ export interface ILocalDependencyData extends IDependencyData { export class TnsModulesCopy { constructor( private outputRoot: string, + private $options: IOptions, private $fs: IFileSystem ) { } @@ -26,12 +27,13 @@ export class TnsModulesCopy { // Remove .ts files let allFiles = this.$fs.enumerateFilesInDirectorySync(tnsCoreModulesResourcePath); - let deleteFilesFutures = allFiles.filter(file => minimatch(file, "**/*.ts", { nocase: true })).map(file => this.$fs.deleteFile(file)); + let matchPattern = this.$options.release ? "**/*.ts" : "**/*.d.ts"; + let deleteFilesFutures = allFiles.filter(file => minimatch(file, matchPattern, { nocase: true })).map(file => this.$fs.deleteFile(file)); Future.wait(deleteFilesFutures); shelljs.rm("-rf", path.join(tnsCoreModulesResourcePath, "node_modules")); - // TODO: The following two lines are necessary to temporarily work around hardcoded + // TODO: The following two lines are necessary to temporarily work around hardcoded // path dependencies in iOS livesync logic. Should be addressed ASAP shelljs.cp("-Rf", path.join(tnsCoreModulesResourcePath, "*"), this.outputRoot); shelljs.rm("-rf", tnsCoreModulesResourcePath);