dotf
Manage multiple dotfiles.
npm i dotf
Features
- Supports multiple dotfiles
- Absolute or relative dotfiles
Example
import dotf from 'dotf';
let dotglobal = dotf('~', 'myrc');
let dotlocal = dotf(__dirname, 'myignore');
let overwriteGlobal = await dotglobal.write({ myGlobal: 1337 });
let overwriteLocal = await dotlocal.write({ myLocal: 2674 });
let globalExists = await dotglobal.exists();
let localExists = await dotlocal.exists();
let globalRead = await dotglobal.read();
let localRead = await dotlocal.read();
Why not use XXX instead?
- I didn't see support for custom paths in dotfile in other packages (i.e. /dotfile).
- This module provides 1 liner read/write/existance with the modern await syntax.
Tests (ava)
npm i
npm test