README
read-tsconfig
Install
$ npm install read-tsconfig
Usage
const readTsconfig = require('read-tsconfig');
readTsconfig().then(config => {
console.log(config);
/*
{
compilerOptions: {
outDir: 'dist',
// ...
}
}
*/
});
console.log(readTsconfig.sync({cwd: './packages/foo'}));
API
options
)
readTsconfig(- Params:
options
:<ReadOptions>
- Returns:
Promise<{}>
options
)
readTsconfig.sync(- Params:
options
:<ReadOptions>
- Returns:
<object>
ReadOptions
cwd
:<string>
- default:
process.cwd()
- default:
Related
- has-tsconfig - Indicates whether the project has
tsconfig.json
file.
License
MIT © Guntur Poetra