Skip to content

Latest commit

 

History

History

loadYamlConfig

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

load-yaml-config

加载yaml为配置文件,并生成对应的.d.ts类型声明文件。

安装

npm install load-yaml-config

使用

在 Node.js 中使用:

import { loadYamlConfig } from "load-yaml-config";
import * as path from "path";

const configPath = path.join(__dirname, "config.yaml");
const config = loadYamlConfig(configPath);
// 生成.d.ts文件后config将会有类型提示
console.log(config);