0.1.0 • Published 1 year ago

load-config-ts v0.1.0

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Install

npm i load-config-ts -S

Usage

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:

// 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:

License

MIT © ULIVZ