【文件属性】:
文件名称:config:轻松访问节点项目的配置文件
文件大小:9KB
文件格式:ZIP
更新时间:2021-06-13 00:41:47
JavaScript
配置
config是一个小工具,它从你的项目目录中读取配置文件。
默认情况下,它从./config文件夹中读取文件,其中. 代表项目根目录(包含package.json文件)。
例如,如果我们在./config有这些文件:
# ./config/foo.yaml
foo : true
bar : false
# ./config/bar.yaml
foo : false
bar : true
然后我们可以将它添加到我们的项目中:
import config from 'config'
var c = config ( ) ;
// c will equal:
// {
// foo: {
// foo: true
// , bar: false
// }
// , bar: {
// foo: false
// , bar: tr
【文件预览】:
config-master
----.gitignore(32B)
----README.md(3KB)
----wrong()
--------js.js(63B)
--------yaml.js(63B)
--------json.json(51B)
--------yaml.yaml(35B)
----test()
--------alt()
--------test.js(3KB)
----LICENSE(754B)
----babel.js(587B)
----package.json(1KB)
----src()
--------index.js(2KB)
--------readers()
----config()
--------js.js(63B)
--------json.json(51B)
--------yaml.yaml(35B)
----.travis.yml(149B)