1.0.0 • Published 5 years ago
cosmiconfig-lite v1.0.0
comsiconfig-lite
A light alternative to cosmiconfig. It's only purpose is to load config files from any of the following locations:
package.json("my-module"-key)my-module.config.jsmy-module.config.cjsmy-module.config.mjsmy-module.config.ts
Usage
npm install cosmiconfig-lite
# or via yarn
yarn add cosmiconfig-liteimport { loadCosmiConfig } from "cosmiconfig-lite";
async function loadConfig() {
const config = loadCosmiConfig(
"my-module", // your package name
process.cwd() // path to start looking for config files
);
return config;
}
loadConfig();License
MIT, see the LICENSE file.
1.0.0
5 years ago