dot-file-config

0.6.1 • Public • Published

dot-file-config

Build Status

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 to onFirstRun

Related

License

MIT © ewnd9

/dot-file-config/

    Package Sidebar

    Install

    npm i dot-file-config

    Weekly Downloads

    7

    Version

    0.6.1

    License

    MIT

    Last publish

    Collaborators

    • ewnd9