3.2.2 • Published 3 years ago

@sliphua/lilconfig-ts-loader v3.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

A TypeScript loader for lilconfig. Migrated from @endemolshinegroup/cosmiconfig-typescript-loader. Bug reports and feature requests go check there first.

Installation

yarn add @sliphua/lilconfig-ts-loader

Usage

import { lilconfig } from 'lilconfig';
import { TypeScriptLoader } from '@sliphua/lilconfig-ts-loader';

const moduleName = 'myModuleName';
const explorer = lilconfig(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,
  },
});