This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
admin-panel/graphql-types/node_modules/cosmiconfig-toml-loader
2021-03-09 19:44:13 +01:00
..
dist add configured graphql-codegen 2021-03-09 19:44:13 +01:00
LICENSE add configured graphql-codegen 2021-03-09 19:44:13 +01:00
package.json add configured graphql-codegen 2021-03-09 19:44:13 +01:00
README.md add configured graphql-codegen 2021-03-09 19:44:13 +01:00

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,
  },
});