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

@taskr/typescript support for tsconfig.json #309

Open
mtoso opened this issue Apr 2, 2018 · 1 comment
Open

@taskr/typescript support for tsconfig.json #309

mtoso opened this issue Apr 2, 2018 · 1 comment
Labels

Comments

@mtoso
Copy link

mtoso commented Apr 2, 2018

Hi,
thanks for this project. I was wondering if there is a way to use the options for the typescript compiler coming from the tsconfig.json.

@lukeed
Copy link
Owner

lukeed commented Apr 2, 2018

Hey, thanks~! Right now the plugin is only expecting programmatic options, which correlate to the Compiler Options.

If you wanted to use an existing tsconfig.json file, you can parse it at the beginning of your TS task and send along the right pieces.

export async function scripts(task) {
  let data = require('./tsconfig');
  // If using tsconfig for "source" you must handle that on your own
  let files = data.files.map(handler) || 'src/**/*.ts';
  await task.source(files).typescript(data.compilerOptions).target('...');
}

@lukeed lukeed added the plugin label Apr 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants