Skip to content

Add the ability to pass the --build option to tsc #63

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

Open
jessecrossen opened this issue Aug 16, 2018 · 2 comments
Open

Add the ability to pass the --build option to tsc #63

jessecrossen opened this issue Aug 16, 2018 · 2 comments

Comments

@jessecrossen
Copy link

I would like to use the --build option that ships with TypeScript 3+, but there seems to be no way to inject it into the tsc arguments list. I can think of two ways to implement this, either specifically for this argument by adding the following to compiler.js:

if (options.build) {
  nodeArgs.push('--build');
}

or more generally by allowing arbitrary arguments to be passed through:

if (options.args) {
  nodeArgs = nodeArgs.concat(options.args);
}

I'm happy to submit a PR if needed.

@jessecrossen
Copy link
Author

Actually on closer inspection it looks like it still wouldn't be easy to pass these options in from the hook scripts in my project, so that might also need to be considered.

@jessecrossen
Copy link
Author

jessecrossen commented Aug 16, 2018

Actually this is much more complex than I had thought. I'd still like the feature, but doubt I'm up to submitting an acceptable PR. Among other things, a clean solution will depend on this issue being resolved: microsoft/TypeScript#26147

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant