2.1.1 • Published 7 months ago

load-code v2.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

introduce

读取文件配置

install

npm i load-code

use

读取文件优先级test.config.ts->test.config.js->test.config.cjs->test.config.js->test.config.mjs->test.config.json->package.json的test字段

import { loadConfig } from 'load-code'

// 传配置名,基于配置名,读取配置
const configData = await loadConfig('test')
function loadConfig<T = any>(cli: string, cwd?: string): Promise<{
  path?: string // 配置文件路径
  data?: T // 配置数据
}>
2.1.1

7 months ago

2.1.0

8 months ago

2.0.0

9 months ago

1.0.0

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago