2.0.2 • Published 3 years ago

dotf v2.0.2

Weekly downloads
11,167
License
MIT
Repository
github
Last release
3 years ago

Manage multiple dotfiles.

npm i dotf

Features

  • Supports multiple dotfiles
  • Absolute or relative dotfiles

Example

import dotf from 'dotf';

// Setup dotfiles
let dotglobal = dotf('~', 'myrc'); // Global (~)
let dotlocal = dotf(__dirname, 'myignore'); // Local (./)

// Write
let overwriteGlobal = await dotglobal.write({ myGlobal: 1337 });
let overwriteLocal = await dotlocal.write({ myLocal: 2674 });

// Exists
let globalExists = await dotglobal.exists();
let localExists = await dotlocal.exists();

// Read
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
2.0.2

3 years ago

2.0.1

3 years ago

1.5.5

3 years ago

1.5.4

3 years ago

2.0.0

3 years ago

1.5.3

3 years ago

1.5.2

4 years ago

1.5.1

4 years ago

1.5.0

4 years ago

1.4.2

4 years ago

1.4.1

4 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

0.1.0

7 years ago