@justichentai/config-parsing
v1.0.3
Published
一个用于解析自定义配置文件的工具 例如解析 xxx.config.js | ts | json; A tool that can parse custom configuration files like xxx.config.js | ts | json
Downloads
1
Readme
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 };