Necrotizing Pineapple Music
    Wondering what’s next for npm?Check out our public roadmap! »

    cosmiconfig-toml-loader
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.0 • Public • Published

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

    Install

    npm i cosmiconfig-toml-loader

    DownloadsWeekly Downloads

    913,822

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    3.52 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar