ahalls
ahalls

Reputation: 1093

How can I hide autogenerated files by TypeScript in a NativeScript Project

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?

Upvotes: 1

Views: 402

Answers (2)

Nitheen Rao
Nitheen Rao

Reputation: 210

Visual Studio code settings for hiding files.

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

VS Code Settings

Upvotes: 2

ahalls
ahalls

Reputation: 1093

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"}
   }
}

Upvotes: 2

Related Questions