Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iguntur/read-tsconfig
Read tsconfig.json file
https://github.com/iguntur/read-tsconfig
compiler config json5 pkg read ts tsc tsconfig typescript
Last synced: about 2 months ago
JSON representation
Read tsconfig.json file
- Host: GitHub
- URL: https://github.com/iguntur/read-tsconfig
- Owner: iguntur
- License: mit
- Created: 2018-12-09T23:30:38.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-20T23:37:09.000Z (about 6 years ago)
- Last Synced: 2024-12-07T21:44:58.088Z (2 months ago)
- Topics: compiler, config, json5, pkg, read, ts, tsc, tsconfig, typescript
- Language: TypeScript
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# read-tsconfig
[](https://travis-ci.org/iguntur/read-tsconfig)
[](#)
[](https://www.npmjs.org/package/read-tsconfig)
[](#)---
## Install
```console
$ npm install read-tsconfig
```## Usage
```js
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: ``#### `ReadOptions`
- `cwd`: ``
- default: `process.cwd()`## Related
- [has-tsconfig](https://github.com/iguntur/has-tsconfig) - Indicates whether the project has `tsconfig.json` file.
## License
MIT © [Guntur Poetra](https://github.com/iguntur)