1.0.3 • Published 11 months ago

@justichentai/config-parsing v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

Config-parsing

A tool that can parse custom configuration files like xxx.config.js | ts | json

中文文档

Install

npm i @justichentai/config-parsing

Usage

The path is the relative path of the configuration file to the runtime directory

import configParsing from '@justichentai/config-parsing'

const res1 = await configParsing('./my.config.ts')

const res2 = await configParsing('./my.config.js')

const res3 = await configParsing('./my.config.json')

Api

/**  
 * parse custom configuration files
 * @param filePath The path is the relative path of the configuration file to the runtime directory
 */  
declare function configParsing(filePath: string): Promise<any>;  
  
export { configParsing as default };