stockpiler:简化您的 Node.js 配置

时间:2021-06-02 14:54:51
【文件属性】:
文件名称:stockpiler:简化您的 Node.js 配置
文件大小:11KB
文件格式:ZIP
更新时间:2021-06-02 14:54:51
JavaScript 堆垛机 Stockpiler 旨在成为管理项目配置的最简单方法。 从特定于环境的 JSON 文件、环境变量和 CLI 参数中聚合选项,并轻松定义项目级默认值。 所有配置都合并到一个对象中,从而无需事先知道您的配置将以哪种形式提供。 安装 $ npm install --save stockpiler 用法 默认情况下,Stockpiler 在您的项目根目录中查找config目录。 要设置默认值,请添加一个用您需要的任何内容填充的default.json文件。 // All options passed to the stockpiler module are defaults and can be excluded var config = require ( "stockpiler" ) ( { configDir : __dirname + "/../../config
【文件预览】:
stockpiler-master
----LICENSE(1KB)
----test()
--------altconfig()
--------libConfig.js(2KB)
--------meta.js(1KB)
--------file.js(1KB)
--------config()
--------environment.js(2KB)
--------cli.js(2KB)
--------mocha.opts(27B)
----README.md(5KB)
----.gitignore(535B)
----index.js(5KB)
----package.json(937B)

网友评论