1.0.1 • Published 6 years ago
read-tsconfig v1.0.1
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
readTsconfig(options
)
- Params:
options
:<ReadOptions>
- Returns:
Promise<{}>
readTsconfig.sync(options
)
- 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