@sliphua/lilconfig-ts-loader
TypeScript icon, indicating that this package has built-in type declarations

3.2.2 • Public • Published

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

Package Sidebar

Install

npm i @sliphua/lilconfig-ts-loader

Weekly Downloads

101,890

Version

3.2.2

License

MIT

Unpacked Size

10.3 kB

Total Files

13

Last publish

Collaborators

  • sliphua