1

I'm new to NativeScript and TypeScript. I'm building an app and finding all the extra .js and .js.map files in the app directory very distracting.

Is there a way to hide this files?

I'm playing around with the "outDir": "./dist", option in the tsconfig.json file. It places all the generated files into the ./dist directory as expected. When I run the project I get the following error:

undefined: JS ERROR Error: Could not find module './'. Computed path '/LOCATION_OF_SIMULATOR/typescripttest.app/app'.

I'm wondering if there is a way to have the runtime to check both the app directory and the dist directory?

ahalls
  • 1,095
  • 1
  • 12
  • 23
  • I like the VSCode answer. But I was wondering if there is a way to actually have the files in a different directory tree. So any tool will not be cluttered with these files. – ahalls Sep 27 '16 at 22:32

2 Answers2

2

You can use VSCode to hide the files from the side bar by adding the following to your workspace or global vscode settings.json file. Details at this answer.

{
   "files.exclude": {
       "**/.git": true,
       "**/.DS_Store": true,
       "**/*.js.map": true,
       "**/*.js": {"when": "$(basename).ts"}
   }
}
Community
  • 1
  • 1
ahalls
  • 1,095
  • 1
  • 12
  • 23
2

Visual Studio code settings for hiding files.

{
    "files.exclude": {
        "**/*.css": true,
         "**/*.js": { "when": "$(basename).ts"},
         "**/*.map": true       
    }    
}

VS Code Settings

Nitheen Rao
  • 210
  • 2
  • 11