dot-file-config
v0.6.1dot-file-config
A dot-file is generally any file whose name begins with a full stop. https://en.wikipedia.org/wiki/Dot-file
Manage application state via config in json dot-file
Install
$ npm install dot-file-config --save
Usage
var config = require('dot-file-config')('.your-app-name', {
defaultConfigFile: <String>, // relative path
onFirstRun: <Function> // optional
});
config.path // path to config file
config.defaultPath // absolute path to default config file (argument can be relative)
config.data // content of dot-file
config.isFirstRun // true when config didn't exist before
config.save() // persist config.data back to dot-file
Changelog
v0.6.0
- Removed symlinking to Dropbox
- options'
firstRunCallback
renamed toonFirstRun
Related
License
MIT © ewnd9