cosmiconfig-toml-loader
v1.0.0
Published
A TOML loader for Cosmiconfig
Downloads
2,422,202
Maintainers
Readme
cosmiconfig-toml-loader
A TOML loader for Cosmiconfig
Installation
npm install cosmiconfig-toml-loader
Usage
import cosmiconfig from 'cosmiconfig';
import { loadToml } from 'cosmiconfig-toml-loader';
const moduleName = 'myModuleName';
const explorer = cosmiconfig(moduleName, {
searchPlaces: [
'package.json',
`.${moduleName}rc.toml`
`.${moduleName}rc`,
`.${moduleName}rc.json`,
`.${moduleName}rc.yaml`,
`.${moduleName}rc.yml`,
`.${moduleName}rc.ts`,
`.${moduleName}rc.js`,
`${moduleName}.config.js`,
],
loaders: {
'.toml': loadToml,
},
});