Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

TypeScript BuildPath

angelozerr edited this pageNov 2, 2016 ·13 revisions

TypeScript Build Path

TypeScript Nature

A lot of Eclipse plugins (JDT, JSDT, other TypeScript plugins) useEclipse Nature which is used for instance to show/hide some menus according the nature(s) of the Eclipse project.

TypeScript IDE doesn't useEclipse Nature because a TypeScript project can be created with other IDE likeVSCode,Atom,WebStorm, etc.

ForTypeScript IDE, an Eclipse project is a TypeScript project if it contains one or moretsconfig.json files. The problem is thattsconfig.json files can be hosted in any folders of the project. To avoid scanning each time the whole of files of project,TypeScript IDE uses the following rules:

  • it searchestsconfig.json file inside theroot project and/src folder. If atsconfig.json file exists in those locations, the project hasTypeScript Nature.

  • iftsconfig.json is not found in the default location, you can add one or several folders of your project by usingTypeScript Build Path.

When a project hasTypeScript Nature:

  • it displayTypeScript Resources in the root of project inside theProject Explorer:

TypeScript Nature Inside Project Explorer

  • theTypeScript menu item of the project properties is shown:

TypeScript Nature Inside Project Properties

Please note thatTypeScript IDE doesn't needTypeScript Nature if you wish to use just completion, hover, search insideTypeScript Editor since it consummestsserver.

What is Build Path?

When a project is loaded,TypeScript IDE searchestsconfig.json inside theroot project and/src folder. If atsconfig.json file exists in those locations, the project hasTypeScript Nature but your project could not follow this rule.

If you are in this case, you must configureBuild Path by setting where your(s)tsconfig.json file(s) is(are) hosted. TypeScriptBuild Path is a list of folders which contains atsconfig.json file in the root folder.Build Path is used for:

Here a demo with add/removeBuild Path:

Demo With Build Path

Add Build Path

To addBuild Path, select your custom folder which contains yourtsconfig.json file, open contextual menu and selectAdd to TypeScript BuildPath...

TypeScript Build Path Add Menu

If your selected folder doesn't contains atsconfig.json file in the root, it opens a dialog which searches folders which containstsconfig.json files that you can select:

TypeScript Build Path Add Dialog

Remove Build Path

To removeBuild Path, select your custom folder which contains yourtsconfig.json file, open contextual menu and selectRemove to TypeScript BuildPath...

TypeScript Build Path Remove Menu

Default Build Path

TODO : manage default build path with UI preferences to add other default folder (seeissue 55).

Compilation

TODO: working on this issue.

Clone this wiki locally


[8]ページ先頭

©2009-2025 Movatter.jp