rc-config-loader

  • Version 4.0.0
  • Published
  • 26.6 kB
  • 4 dependencies
  • MIT license

Install

npm i rc-config-loader
yarn add rc-config-loader
pnpm add rc-config-loader

Overview

load config file from .{product}rc.{json,yml,js}

Index

Functions

function rcFile

rcFile: <R extends {}>(
pkgName: string,
opts?: rcConfigLoaderOption
) => { config: R; filePath: string } | undefined;
  • Find and load rcfile, return { config, filePath } If not found any rcfile, throw an Error.

    Parameter pkgName

    Parameter opts

    Returns

    {{ config: Object, filePath:string } | undefined}

Interfaces

interface rcConfigLoaderOption

interface rcConfigLoaderOption {}

    property configFileName

    configFileName?: string;

      property cwd

      cwd?: string;

        property defaultExtension

        defaultExtension?: string | string[];

          property packageJSON

          packageJSON?:
          | boolean
          | {
          fieldName: string;
          };

            Package Files (1)

            Dependencies (4)

            Dev Dependencies (12)

            Peer Dependencies (0)

            No peer dependencies.

            Badge

            To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

            You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/rc-config-loader.

            • Markdown
              [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/rc-config-loader)
            • HTML
              <a href="https://www.jsdocs.io/package/rc-config-loader"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>