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 ability to import files from tsconfig #7

Closed
dsherret opened this issue Apr 9, 2017 · 2 comments
Closed

Add ability to import files from tsconfig #7

dsherret opened this issue Apr 9, 2017 · 2 comments

Comments

@dsherret
Copy link
Owner

dsherret commented Apr 9, 2017

ast.addSourceFilesFromTsConfig(tsconfigPath?: string)
  • By default, it would use the source file specified when creating an ast.
  • This would be opt-in, as shown.
@dsherret
Copy link
Owner Author

dsherret commented Jul 1, 2017

I believe ts.parseJsonConfigFileContent would be used for this. Might be better to make this an option like so...

const ast = new Ast({
    tsConfigFilePath: "tsconfig.json",
    addFilesFromTsConfig: true
});

...with it defaulting to true if tsConfigFilePath != null

@dsherret
Copy link
Owner Author

dsherret commented Jul 2, 2017

I don't believe it's worth it to work on this until ts.matchFiles is exposed in the compiler api. See here: microsoft/TypeScript#13793

dsherret added a commit that referenced this issue Jul 2, 2017
Also, stopped automatically loading a tsconfig.json and use the real default compiler options from the compiler. I think automatically loading a tsconfig.json could cause confusion and I'd rather people be explicit about what they want to load with this library.
@dsherret dsherret removed the blocked label Jan 6, 2018
@dsherret dsherret added this to the Version 6.0 milestone Jan 6, 2018
dsherret added a commit that referenced this issue Jan 6, 2018
BREAKING CHANGE: Files are added based on the tsconfig by default. `getCompilerOptionsFromTsConfig` now returns an object that includes the diagnostics.
@dsherret dsherret closed this as completed Jan 6, 2018
dsherret added a commit that referenced this issue Jan 13, 2018
dsherret added a commit that referenced this issue Jan 13, 2018
dsherret added a commit that referenced this issue Jan 13, 2018
dsherret added a commit that referenced this issue May 14, 2019
BREAKING CHANGE: Files are added based on the tsconfig by default. `getCompilerOptionsFromTsConfig` now returns an object that includes the diagnostics.
dsherret added a commit that referenced this issue May 14, 2019
dsherret added a commit that referenced this issue May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant