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

Shorthand flags don't work with --build #26872

Closed
Tyriar opened this issue Sep 4, 2018 · 6 comments
Closed

Shorthand flags don't work with --build #26872

Tyriar opened this issue Sep 4, 2018 · 6 comments
Labels
Experience Enhancement Noncontroversial enhancements Fixed A PR has been merged for this issue Good First Issue Well scoped, documented and has the green light Help Wanted You can do this Suggestion An idea for TypeScript
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Sep 4, 2018

TypeScript Version: 3.0.3

Search Terms:

project references
watch
build

Code

This doesn't work:

./node_modules/.bin/tsc --build -w
error TS5072: Unknown build option '-w'.

This does:

./node_modules/.bin/tsc --build --watch

Related Issues: #25613

@RyanCavanaugh RyanCavanaugh added the Working as Intended The behavior described is the intended behavior; this is not a bug label Sep 20, 2018
@RyanCavanaugh
Copy link
Member

We only have a few build flags at the moment (and intend to add more later), so for the time being we're not assigning single-letter variants. Once we're more confident that watch will be the most common w option, we'll make the shorthand equivalents work

@Tyriar
Copy link
Member Author

Tyriar commented Sep 21, 2018

@RyanCavanaugh but -w is already the shorthand for --watch when using tsc without --build. Isn't that really weird if -w changes conditionally based on whether or not it's used with --build?

$ tsc  --help
Version 3.0.3
...
 -w, --watch                                        Watch input files.

@RyanCavanaugh RyanCavanaugh added Suggestion An idea for TypeScript Experience Enhancement Noncontroversial enhancements and removed Working as Intended The behavior described is the intended behavior; this is not a bug labels Sep 21, 2018
@RyanCavanaugh
Copy link
Member

Just noticed we already have short flags for other stuff under --build... so yeah let's assign w to watch.

@Tyriar
Copy link
Member Author

Tyriar commented Sep 21, 2018

@RyanCavanaugh you forgot to reopen, also this might be a good one for help wanted/good first issue?

@RyanCavanaugh RyanCavanaugh reopened this Sep 21, 2018
@RyanCavanaugh RyanCavanaugh added Help Wanted You can do this Good First Issue Well scoped, documented and has the green light labels Sep 21, 2018
@RyanCavanaugh RyanCavanaugh added this to the Community milestone Sep 21, 2018
@sheetalkamat
Copy link
Member

This is fixed in master?

@NeilsC
Copy link

NeilsC commented Oct 1, 2018

This appears to be resolved in the nightly build:

$ npm install typescript@next

$ ./node_modules/.bin/tsc --version 
Version 3.2.0-dev.20180929

$ ./node_modules/.bin/tsc --build -w
[8:39:12 AM] Starting compilation in watch mode...

@sheetalkamat sheetalkamat added the Fixed A PR has been merged for this issue label Oct 1, 2018
@RyanCavanaugh RyanCavanaugh modified the milestones: Community, Backlog Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Experience Enhancement Noncontroversial enhancements Fixed A PR has been merged for this issue Good First Issue Well scoped, documented and has the green light Help Wanted You can do this Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

4 participants