1.0.0 • Published 6 years ago

import-config v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

import-config

Travis Codecov Version License Download

这是一个 Node.js 配置文件加载器。

支持递归加载文件夹配置文件。 目前支持 .json.yaml 格式配置文件。

安装

npm i import-config

使用

const { importConfig } from "import-config";

const config = importConfig(`${__dirname}."/config"`);

console.log(config);

改进计划

  1. 支持 js/ts 格式配置
  2. 异步加载配置