Acid JS - Config :file_folder:
Acid JS 的配置架构。
注意:@acidjs
生态系统中的所有项目(有一些异常)可通过此包进行配置。 每个包在主配置对象 (lib/defaults/index.js
) 中都有自己的密钥。 The options can be overwritten using YAML - 现场演示
Install
npm install @acidjs/config
Usage
const config = require('@acidjs/config')
console.log(config)
要覆盖默认设置,请在项目的根目录中创建 .acid/config.yml
。 如果你的配置文件有错误,你会收到通知,否则你会得到一个合并的对象(defaults,你的配置)。
这是一个更改 @acidjs/log
包的 prefix
的简单示例。 有关配置的更多详细信息,请查看您要配置的特定包。
# .acid/config.yml
log:
prefix: my-app
License
MIT 许可
版权所有 (c) 2020 Michael Arakilian
特此免费授予任何获得副本的人许可
本软件和相关文档文件(“软件”),处理
在软件中不受限制,包括但不限于权利
使用、复制、修改、合并、发布、分发、再许可和/或出售
该软件的副本,并允许该软件是
提供这样做,但须满足以下条件:
上述版权声明和本许可声明应包含在所有
软件的副本或重要部分。
本软件“按原样”提供,不提供任何形式的明示或保证
暗示的,包括但不限于适销性保证,
适用于特定目的和非侵权。 在任何情况下都不得
作者或版权持有人对任何索赔、损害或其他
责任,无论是在合同、侵权或其他方面的行为中,由以下原因引起,
出于或与软件或使用或其他交易有关
软件。
Acid JS - Config :file_folder:
Configuration schema for Acid JS.
Note: All projects within the @acidjs
ecosystem (with some exceptions) are configurable through this package. Each package will have its own key within the main confiuguration object(lib/defaults/index.js
). The options can be overwritten using YAML - Live Demo
Install
npm install @acidjs/config
Usage
const config = require('@acidjs/config')
console.log(config)
To overwrite defaults, create .acid/config.yml
in the root directory of your project. If there is a mistake in your config file, you will be notified, else you'll get back a mergedobject(defaults, yourconfigs).
Here is a simple example of changing the prefix
for the @acidjs/log
package. For more details on configurations, check out the specific package you want to configure.
# .acid/config.yml
log:
prefix: my-app
License
MIT License
Copyright (c) 2020 Michael Arakilian
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.