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 11 hours 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 (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-19T03:41:21.000Z (almost 6 years ago)
- Last Synced: 2024-03-25T06:23:23.396Z (8 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
[![Travis CI](https://img.shields.io/travis/iguntur/read-tsconfig-up.svg?style=flat-square)](https://travis-ci.org/iguntur/read-tsconfig-up)
[![node](https://img.shields.io/node/v/read-tsconfig-up.svg?style=flat-square)](#)
[![npm](https://img.shields.io/npm/v/read-tsconfig-up.svg?style=flat-square)](https://www.npmjs.org/package/read-tsconfig-up)
[![PRs](https://img.shields.io/badge/PRs-welcome-blue.svg?style=flat-square)](#)---
## 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)