# prettyme

> A tiny prettifier

Latest version **2.1.9** (published 2018-05-12) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.9 |
| Published | 2018-05-12 |
| First published | 2018-04-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 814.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Juan Castro Fernández |
| Maintainers | castrofernandez |

## Links

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

## Recent versions

- 2.1.9 (latest) — 2018-05-12
- 2.1.8 — 2018-05-12
- 2.1.7 — 2018-05-11
- 2.1.6 — 2018-05-11
- 2.1.5 — 2018-05-11
- 2.1.4 — 2018-05-11
- 2.1.3 — 2018-05-11
- 2.1.2 — 2018-05-11
- 2.1.1 — 2018-05-10
- 2.1.0 — 2018-05-09
- 2.0.6 — 2018-05-03
- 2.0.5 — 2018-05-03
- 2.0.4 — 2018-05-03
- 2.0.3 — 2018-05-02
- 2.0.2 — 2018-05-02
- … 5 more at https://npm.io/package/prettyme/versions

## README

# prettyme
A tiny prettyfier for HTML and CSS

1. Install 

```
npm install prettyme
```

2. Usage

You need to include the file(s) of the language(s) to use.

```
import prettyme from 'prettyme';
import html from 'prettyme/languages/html';

prettyme.init({
  language: 'html',
  selector: '.prettyme'
});

prettyme.load();
```

3. Run depelopment watch

```
npm run dev
```

Open browser pointing to http://localhost:8383/example/

4. Run tests

```
npm run test
```

5. Build dist

```
npm run build
```

6. Upload build

The build must be generated before (point 6)

```
npm publish
```

7. List of methods

* init: sets initial options.
   * language: 'html', 'css' or 'json'
   * selector: CSS selector to use in *load* method.
   * lines: when true show line numbers.
* load: formats every *selector* set in initial options.

8. Create new language

* Create language in src/languages this will need:
   * create lexer in src/languages

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