Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Skipped
45 lines
1.1 KiB
Plaintext
45 lines
1.1 KiB
Plaintext
**💛 You can help the author become a full-time open-source maintainer by [sponsoring him on GitHub](https://github.com/sponsors/egoist).**
|
|
|
|
---
|
|
|
|
# load-tsconfig
|
|
|
|
[](https://npm.im/load-tsconfig) [](https://npm.im/load-tsconfig)
|
|
|
|
> Load `tsconfig.json`, light-weight and dependency-free.
|
|
|
|
## Install
|
|
|
|
```bash
|
|
npm i load-tsconfig
|
|
```
|
|
|
|
## Usage
|
|
|
|
```ts
|
|
import { loadTsConfig } from "load-tsconfig"
|
|
|
|
const loaded = loadTsConfig(".")
|
|
|
|
// loaded is null when no tsconfig is found, or:
|
|
// loaded.path -> the path to the tsconfig file
|
|
// loaded.data -> the merged tsconfig
|
|
// loaded.files -> all discovered tsconfig files (via "extends")
|
|
```
|
|
|
|
By default it loads `./tsconfig.json`, but you can use a custom filename:
|
|
|
|
```ts
|
|
loadTsConfig(".", "tsconfig.build.json")
|
|
```
|
|
|
|
Full type documentation: https://paka.dev/npm/load-tsconfig
|
|
|
|
## Sponsors
|
|
|
|
[](https://github.com/sponsors/egoist)
|
|
|
|
## License
|
|
|
|
MIT © [EGOIST](https://github.com/sponsors/egoist)
|