# dotf

> Dotfile manager

Latest version **2.0.2** (published 2021-08-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install dotf
pnpm add dotf
yarn add dotf
bun add dotf
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2021-08-30 |
| First published | 2017-08-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | ^12.20.0 \|\| ^14.13.1 \|\| >=16.0.0 |
| Dependencies | 2 |
| Unpacked size | 7.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Grant Timmerman |
| Maintainers | grant, shinout, popgoesthewza |

## Links

- npm: https://www.npmjs.com/package/dotf
- Repository: https://github.com/grant/dotf
- Homepage: https://github.com/grant/dotf#readme
- Issues: https://github.com/grant/dotf/issues
- npm.io page: https://npm.io/package/dotf

## Dependencies (2)

- [jsonfile](https://npm.io/package/jsonfile.md) ^6.1.0
- [graceful-fs](https://npm.io/package/graceful-fs.md) ^4.2.8

## Recent versions

- 2.0.2 (latest) — 2021-08-30
- 2.0.1 — 2021-08-09
- 2.0.0 — 2021-05-25
- 1.5.5 — 2021-05-25
- 1.5.4 — 2021-05-25
- 1.5.3 — 2020-12-15
- 1.5.2 — 2020-07-14
- 1.5.1 — 2020-05-14
- 1.5.0 — 2020-02-29
- 1.4.2 — 2020-02-22
- 1.4.1 — 2020-02-21
- 1.4.0 — 2019-05-24
- 1.3.0 — 2019-05-23
- 1.2.0 — 2018-11-25
- 1.1.2 — 2018-11-13
- … 6 more at https://npm.io/package/dotf/versions

## README

<h1>dotf <a href="https://travis-ci.org/grant/dotf"><img src="https://travis-ci.org/grant/dotf.svg?branch=master" alt="Build Status"></a> <a href="https://www.npmjs.com/package/dotf"><img src="https://img.shields.io/npm/v/dotf.svg" alt="npm Version"></a>
</h1>

Manage multiple dotfiles.

```sh
npm i dotf
```

## Features

- Supports multiple dotfiles
- Absolute or relative dotfiles

## Example

```js
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)

```sh
npm i
npm test
```

---
_Source: https://npm.io/package/dotf · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
