HomeConf
Global config files for cli apps helper
Table of Contents
Installation
npm install --save homeconfjs
Usage
The file will be created automatically, named packageName.json
at the path homeConf.path
that may varies depending on the current OS.
const HomeConf = ;const homeConf = ; // Default: {}
Or
const HomeConf = ;const homeConf = defaultObject; // Specify the default object
Or
const HomeConf = ;const homeConf = `/default.json`; // Use the file as default
API
config
Get the actual config object.
homeConf.config
path
Get the path of the config file
homeConf.path
get('objectPath')
Get a value by its object path.
homeConf
set('objectPath', value)
Set and save a value by its object path.
homeConf
License
This project is under the MIT license.