Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to TypeScript server for tsconfig.json files. #2450

Merged
merged 4 commits into from
Mar 24, 2015

Conversation

steveluc
Copy link
Contributor

When a file F is opened by the host, the server will now check whether F is configured by a tsconfig.json file and, if so, use the specified project as the context for F.

Still TODO, monitor tsconfig.json files for changes and update configuration. For now, programmers will need to restart their editor to pick up the tsconfig.json file changes.

steveluc added 2 commits March 20, 2015 21:56
file F, the server will check whether F is configured by a
tsconfig.json file.  If so, the project specified by the tsconfig.json
file becomes the LS context for F.
in directory configured by tsconfig.json, but file not part of the
configured project.
// TODO: pass true for file exiplicitly opened
var info = this.openFile(normRootFilename, false);
if (ts.sys.fileExists(rootFilename)) {
var info = this.openFile(rootFilename, clientFileName == rootFilename);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use ===

@@ -484,44 +508,77 @@ module ts.server {
this.printProjects();
}

gcConfiguredProjects() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cleanConfiguredProjects or updateConfiguredProjects

@mhegazy
Copy link
Contributor

mhegazy commented Mar 24, 2015

Just a few comments. looks good to me, but i would rather have the findConfigFile logic shared with tsc.ts before it goes in.

@mhegazy
Copy link
Contributor

mhegazy commented Mar 24, 2015

👍

steveluc added a commit that referenced this pull request Mar 24, 2015
Add support to TypeScript server for tsconfig.json files.
@steveluc steveluc merged commit baac6d8 into master Mar 24, 2015
@steveluc steveluc deleted the tsconfigServer branch March 24, 2015 21:38
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants