@speedy-js/config-loader
v0.1.4
Published
An out-of-box config loader with TypeScript support.
Downloads
138
Readme
@speedy-js/config-loader
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