read-tsconfig-up
Install
$ npm install read-tsconfig-upUsage
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
readTsconfigUp(options)
- Params:
-
options:<ReadOptions>
-
- Returns:
Promise<{}>
readTsconfig.sync(options)
- Params:
-
options:<ReadOptions>
-
- Returns:
<object>
ReadOptions
-
cwd:<string>- Directory to start from.- default:
process.cwd()
- default:
Related
-
read-tsconfig - Read
tsconfig.jsonfile. -
has-tsconfig - Indicates whether the project has
tsconfig.jsonfile.
License
MIT © Guntur Poetra