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 11 hours 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 (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-20T23:37:09.000Z (almost 6 years ago)
- Last Synced: 2024-10-14T06:27:31.842Z (25 days 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
[![Travis CI](https://img.shields.io/travis/iguntur/read-tsconfig.svg?style=flat-square)](https://travis-ci.org/iguntur/read-tsconfig)
[![node](https://img.shields.io/node/v/read-tsconfig.svg?style=flat-square)](#)
[![npm](https://img.shields.io/npm/v/read-tsconfig.svg?style=flat-square)](https://www.npmjs.org/package/read-tsconfig)
[![PRs](https://img.shields.io/badge/PRs-welcome-blue.svg?style=flat-square)](#)---
## 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)