bc

bright-config

Based on the default configuration file, the change of individual configuration is determined based on the running environment. Finally return an config object.

Showing:

Popularity

Downloads/wk

1

Maintenance

No Maintenance Data Available

Package

Dependencies

1

Size (min+gzip)

25.5KB

License

Apache-2.0

Type Definitions

Tree-Shakeable

No?

Categories

Readme

bright-config

Based on the default configuration file, the change of individual configuration is determined based on the running environment. Finally return an config object.

基于默认配置文件,根据运行环境确定单个配置的更改。最后返回一个配置对象。

Installation 安装

Install using npm

npm install bright-config

Example 使用例子

Basic usage:

const path = require('path')
const brightConfig = require('bright-config')

const config = brightConfig(path.join(__dirname, './config')) // config配置目录的路径

console.log(config)

Tests 测试

Run tests using npm test

npm test

npm test-test

npm test-pro

config目录例子

----config
--------default // 必须存在默认配置目录
------------app.js
------------db.js
------------oss.js
--------development
------------app.js
------------db.js
------------oss.js
--------production
------------app.js
------------oss.js
--------test
------------app.js

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100