taskr
taskr copied to clipboard
@taskr/typescript support for tsconfig.json
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.
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('...');
}