Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iguntur/read-tsconfig-up
Find up and read tsconfig
https://github.com/iguntur/read-tsconfig-up
config find path read settings tsc tsconfig typescript up
Last synced: about 2 months ago
JSON representation
Find up and read tsconfig
- Host: GitHub
- URL: https://github.com/iguntur/read-tsconfig-up
- Owner: iguntur
- License: mit
- Created: 2018-12-19T03:39:30.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-19T03:41:21.000Z (about 6 years ago)
- Last Synced: 2024-03-25T06:23:23.396Z (11 months ago)
- Topics: config, find, path, read, settings, tsc, tsconfig, typescript, up
- Language: TypeScript
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# read-tsconfig-up
[](https://travis-ci.org/iguntur/read-tsconfig-up)
[](#)
[](https://www.npmjs.org/package/read-tsconfig-up)
[](#)---
## Install
```console
$ npm install read-tsconfig-up
```## Usage
```js
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: ``#### `ReadOptions`
- `cwd`: `` - Directory to start from.
- default: `process.cwd()`## Related
- [read-tsconfig](https://github.com/iguntur/read-tsconfig) - Read `tsconfig.json` file.
- [has-tsconfig](https://github.com/iguntur/has-tsconfig) - Indicates whether the project has `tsconfig.json` file.## License
MIT © [Guntur Poetra](https://github.com/iguntur)