Skip to content

--p command line option should support taking a full path or directory. #2869

New issue

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

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

Already on GitHub? # to your account

Closed
niemyjski opened this issue Apr 22, 2015 · 9 comments
Closed
Labels
Fixed A PR has been merged for this issue Help Wanted You can do this Suggestion An idea for TypeScript

Comments

@niemyjski
Copy link

This would allow you to specify a tsconfig.json that has a different name.

If you specify a directory, it should first try to resolve tsconfig.json. If it can't find it, it should find the first tsconfig*.json file

References: #2868 (comment)

@saschanaz
Copy link
Contributor

  • What benefit can we get when tsc automatically search tsconfig*.json files? What should happen when there are multiple tsconfig* files except tsconfig.json?
  • Should tsc require any naming format? Should it allow project file without .json extension?

@zpdDG4gta8XKpMCd
Copy link

since my request #5705 got closed I am writing here:

  • let's add a parameter that points to whatever configuration file we please: --configuration c:\foo\bar\myproject.csproj

@mhegazy
Copy link
Contributor

mhegazy commented Nov 19, 2015

let's add a parameter that points to whatever configuration file we please: --configuration c:\foo\bar\myproject.csproj

@Aleksey-Bykov can you elaborate on what is the expectation here? do you expect tsc to read the .csproj? where would the infrormation be stored?

@zpdDG4gta8XKpMCd
Copy link

i am saying the developer should be free to specify any file that has a valid tsconfig JSON content even if the name itself doesn't make any sense

@mhegazy
Copy link
Contributor

mhegazy commented Nov 19, 2015

i see, so why not use --project as in the OP?

@zpdDG4gta8XKpMCd
Copy link

because it's already taken it would be a breaking change

@mhegazy
Copy link
Contributor

mhegazy commented Nov 19, 2015

not really, we can check if it is a file path use it, if it is a directory append "tsconfig.json" before reading the file.

@zpdDG4gta8XKpMCd
Copy link

true, good catch

@RyanCavanaugh RyanCavanaugh added the Fixed A PR has been merged for this issue label Nov 24, 2015
@RyanCavanaugh
Copy link
Member

Thanks @saschanaz ! 🎉

@mhegazy mhegazy added this to the TypeScript 1.8 milestone Nov 24, 2015
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Fixed A PR has been merged for this issue Help Wanted You can do this Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

5 participants