@speedy-js/config-loader
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

@speedy-js/config-loader

npm version

An out-of-box config loader with TypeScript support.

Install

npm i @speedy-js/config-loader -S

Usage

import { loadConfig } from '@speedy-js/config-loader';
// This load try to load at process.cwd():
//   - speedy.config.js
//   - speedy.config.ts
//   - speedyrc.js
//   - speedyrc.ts
const config = loadConfig({
  configKey: 'speedy',
});

Custom config path:

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

Credits

@speedy-js/config-loader wouldn't exist without the inspirations from following projects:

License

MIT © ULIVZ

Package Sidebar

Install

npm i @speedy-js/config-loader

Weekly Downloads

23

Version

0.1.4

License

none

Unpacked Size

22.5 kB

Total Files

18

Last publish

Collaborators

  • derozan
  • arrayzoneyour
  • ahaoboy
  • zhusj
  • upupming
  • amour1688
  • null~
  • thisispluto
  • zoolsher
  • ulivz
  • hardfist