# rougher

> Rough up an SVG using Rough.js.

Latest version **1.1.2** (published 2021-07-30) · MIT license · 0 weekly downloads

## Install

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

Provides the command `rougher`.

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2021-07-30 |
| First published | 2020-11-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=14 |
| Dependencies | 5 |
| Unpacked size | 265.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Daniel Perez Alvarez |
| Maintainers | unindented |

## Links

- npm: https://www.npmjs.com/package/rougher
- Repository: https://github.com/unindented/rougher
- Issues: https://github.com/unindented/rougher/issues
- npm.io page: https://npm.io/package/rougher

## Dependencies (5)

- [arg](https://npm.io/package/arg.md) ^5.0.0
- [chalk](https://npm.io/package/chalk.md) ^4.1.0
- [jsdom](https://npm.io/package/jsdom.md) ^16.4.0
- [roughjs](https://npm.io/package/roughjs.md) ^4.3.1
- [w3c-xmlserializer](https://npm.io/package/w3c-xmlserializer.md) ^2.0.0

## Recent versions

- 1.1.2 (latest) — 2021-07-30
- 1.1.0 — 2020-12-01
- 1.0.0 — 2020-11-27

## README

# rougher ✏️

Rough up an SVG using Rough.js.

## Table of contents

- [Install](#install)
- [Usage](#usage)
  - [CLI](#cli)
  - [Node (ESM)](#node-esm)
  - [Node (CJS)](#node-cjs)
  - [Browser (ESM)](#browser-esm)
  - [Browser (IIFE)](#browser-iife)
- [Build](#build)
- [Test](#test)
- [Meta](#meta)
- [Contributors](#contributors)
- [License](#license)

## Install

To install:

```
npm install rougher
```

Or if you prefer using Yarn:

```
yarn add rougher
```

## Usage

### CLI

To get help:

```
rougher --help
```

To process a file and output to stdout:

```
rougher input.svg
```

To process a file and output to a file:

```
rougher input.svg -o output.svg
```

To pipe the output of another command into `rougher`:

```
cat input.svg | rougher
```

### Node (ESM)

```js
import { readFileSync } from "fs";
import roughUp from "rougher";

const inputContents = readFileSync("input.svg");
console.log(roughUp(inputContents.toString()));
```

### Node (CJS)

```js
const { readFileSync } = require("fs");
const roughUp = require("rougher");

const inputContents = readFileSync("input.svg");
console.log(roughUp(inputContents.toString()));
```

### Browser (ESM)

```html
<script type="module">
  import rougher from "https://unpkg.com/rougher/dist/browser/rougher.mjs";

  rougher(document.getElementById("svg"));
</script>
```

### Browser (IIFE)

```html
<script src="https://unpkg.com/rougher/dist/browser/rougher.js"></script>
<script>
  rougher(document.getElementById("svg"));
</script>
```

## Build

To build:

```
npm run build
```

To continuously build on changes:

```
npm run watch:build
```

## Test

To run linting and unit tests:

```
npm test
```

To run just unit tests:

```
npm run test:unit
```

To continuously run unit tests on changes:

```
npm run watch:unit
```

## Meta

- Code: `git clone git://github.com/unindented/rougher.git`
- Home: <https://github.com/unindented/rougher>

## Contributors

- Daniel Perez Alvarez (<https://github.com/unindented>)

## License

This is free software, and may be redistributed under the terms specified in the LICENSE file.

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