# load-config-ts

> Default Template

Latest version **0.1.0** (published 2023-01-20) · 0 weekly downloads

## Install

```sh
npm install load-config-ts
pnpm add load-config-ts
yarn add load-config-ts
bun add load-config-ts
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2023-01-20 |
| First published | 2023-01-20 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 18.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ulivz |
| Keywords | workflow, ulivz, publish, release, npm publish |

## Links

- npm: https://www.npmjs.com/package/load-config-ts
- npm.io page: https://npm.io/package/load-config-ts

## Dependencies (1)

- [bundle-require](https://npm.io/package/bundle-require.md) ^1.3.0

## Recent versions

- 0.1.0 (latest) — 2023-01-20

## README

<h1 align="center">load-config-ts</h1>

<p align="center">
    An out-of-box config loader with TypeScript support.
</p>

<p align="center">
    <a href="https://npmjs.com/package/load-config-ts"><img src="https://img.shields.io/npm/v/load-config-ts.svg?style=flat" alt="NPM version"></a> 
    <a href="https://npmjs.com/package/load-config-ts"><img src="https://img.shields.io/npm/dm/load-config-ts.svg?style=flat" alt="NPM downloads"></a> 
    <a href="https://circleci.com/gh/saojs/load-config-ts"><img src="https://img.shields.io/circleci/project/saojs/load-config-ts/master.svg?style=flat" alt="Build Status"></a> 
</p>

## Install

```bash
npm i load-config-ts -S
```

## Usage

```js
import { loadConfig } from 'load-config-ts';
// This load try to load at process.cwd():
//   - ulivz.config.js
//   - ulivz.config.ts
//   - ulivzrc.js
//   - ulivzrc.ts
const config = loadConfig({
  configKey: 'ulivz',
});
```

Custom config path:

```js
// This will load `ulivz.config.test.js` directly:
const config = loadConfig({
  cwd: useScene('config-suffix'),
  configKey: 'ulivz',
  configFile: 'ulivz.config.test.js',
});
```

## Credits

`load-config-ts` wouldn't exist without the inspirations from following projects:

- [esbuild](https://github.com/evanw/esbuild)
- [bundle-require](https://github.com/egoist/bundle-require)

## License

MIT &copy; [ULIVZ](https://github.com/sponsors/ulivz)

---
_Source: https://npm.io/package/load-config-ts · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
