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?

1
  • 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. Commented Sep 27, 2016 at 22:32

2 Answers 2

2

Visual Studio code settings for hiding files.

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

VS Code Settings

Sign up to request clarification or add additional context in comments.

Comments

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.