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/@endemolshinegroup/cosmiconfig-typescript-loader/README.md

3.4 KiB

Banner

MIT Licensed NPM Version Build Status Dependabot Status

Code Issues Codebase Maintainability Test Coverage Jest

Commitizen Semantic Release Prettier

A TypeScript loader for Cosmiconfig

Installation

yarn add @endemolshinegroup/cosmiconfig-typescript-loader

Usage

import cosmiconfig from 'cosmiconfig';
import TypeScriptLoader from '@endemolshinegroup/cosmiconfig-typescript-loader';

const moduleName = 'myModuleName';
const explorer = cosmiconfig(moduleName, {
  searchPlaces: [
    'package.json',
    `.${moduleName}rc`,
    `.${moduleName}rc.json`,
    `.${moduleName}rc.yaml`,
    `.${moduleName}rc.yml`,
    `.${moduleName}rc.ts`,
    `.${moduleName}rc.js`,
    `${moduleName}.config.ts`,
    `${moduleName}.config.js`,
  ],
  loaders: {
    '.ts': TypeScriptLoader,
  },
});