配置文件
form8ion 用于管理 RC 文件的工具
目录
使用量
安装
$ npm install @form8ion/config-file --save-prod
示例
import {fileTypes} from '@form8ion/core';
import {write} from '@form8ion/config-file';
(async () => {
await write({
format: fileTypes.JSON,
name: 'tool-name',
path: process.cwd(),
config: {foo: 'bar', baz: 'qux'}
});
})();
API 密码
write
将指定的工具的配置写入相应的 rc 文件
以单个选项对象作为参数,包含:
format 字符串 (单位:千美元)所需经费(中文(简体) )
要写入的文件的格式
name 字符串 (单位:千美元)所需经费(中文(简体) )
配置文件要使用的工具名称
path 字符串 (单位:千美元)所需经费(中文(简体) )
包含配置文件的目录路径
config 对象 (单位:千美元)所需经费(中文(简体) )
要写入文件的配置
捐款
依赖关系
$ nvm install
$ npm install
核查
$ npm test