cosmiconfig-lite

1.0.0 • Public • Published

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.js
  • my-module.config.cjs
  • my-module.config.mjs
  • my-module.config.ts

Usage

npm install cosmiconfig-lite
# or via yarn 
yarn add cosmiconfig-lite
import { 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.

Readme

Keywords

none

Package Sidebar

Install

npm i cosmiconfig-lite

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

8.59 kB

Total Files

6

Last publish

Collaborators

  • marvinhagemeister