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