Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Nov 17, 2018
1 parent e4bf704 commit 17083b4
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 9 deletions.
55 changes: 48 additions & 7 deletions packages/rehype-preset-minify/readme.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,44 @@
# rehype-preset-minify [![Build Status][build-badge]][build-status] [![Coverage Status][coverage-badge]][coverage-status] [![Chat][chat-badge]][chat]
# rehype-preset-minify

**rehype-preset-minify** minifies and mangles HTML with [**rehype**][rehype].
[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Chat][chat-badge]][chat]

**rehype-preset-minify** is an HTML minifier based on [**rehype**][rehype].

##### In

```html
<!doctype html>
<html lang="en-GB">
<head>
<meta charset="utf-8">
<meta http-equiv="content-language" content="en-US">
<script src="index.js" type="text/javascript" language="javascript">
alert(true);
</script>
<link rel="stylesheet" href="index.css" type="text/css">
<title>Foo &amp; bar</title>
</head>
<body>
<h1 class="foo foo">bar bar</h1>
<p id="alfred" id="alfred"> <strong>foo</strong> <em>bar</em> </p>
<button type="BUTTON" onclick="javascript:return false">Alpha</button>
</body>
</html>
```

##### Out

```html
<!doctypehtml><html lang=en-US><meta charset=utf8><script src=index.js></script><link rel=stylesheet href=index.css><title>Foo &amp bar</title><h1 class=foo>bar bar</h1><p id=alfred><strong>foo</strong> <em>bar</em></p><button type=button onclick=return!1>Alpha</button>
```

## Install

[npm][]:

```sh
npm install rehype-preset-minify
```
Expand Down Expand Up @@ -57,7 +92,7 @@ rehype()
Yields:

```html
<!doctype html><title>Hello</title><h1>World!</h1>
<!doctypehtml><title>Hello</title><h1>World!</h1>
```

## License
Expand All @@ -68,15 +103,21 @@ Yields:

[build-badge]: https://img.shields.io/travis/rehypejs/rehype-minify.svg

[build-status]: https://travis-ci.org/rehypejs/rehype-minify
[build]: https://travis-ci.org/rehypejs/rehype-minify

[coverage-badge]: https://img.shields.io/codecov/c/github/rehypejs/rehype-minify.svg

[coverage-status]: https://codecov.io/github/rehypejs/rehype-minify
[coverage]: https://codecov.io/github/rehypejs/rehype-minify

[downloads-badge]: https://img.shields.io/npm/dm/rehype-preset-minify.svg

[downloads]: https://www.npmjs.com/package/rehype-preset-minify

[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg

[chat-badge]: https://img.shields.io/gitter/room/rehypejs/Lobby.svg
[chat]: https://spectrum.chat/unified/rehype

[chat]: https://gitter.im/rehypejs/Lobby
[npm]: https://docs.npmjs.com/cli/install

[author]: https://wooorm.com

Expand Down
6 changes: 4 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
##### Out

```html
<!doctype html><html lang=en-US><meta charset=utf8><script src=index.js></script><link rel=stylesheet href=index.css><title>Foo &amp bar</title><h1 class=foo>bar bar</h1><p id=alfred><strong>foo</strong> <em>bar</em></p><button type=button onclick=return!1>Alpha</button>
<!doctypehtml><html lang=en-US><meta charset=utf8><script src=index.js></script><link rel=stylesheet href=index.css><title>Foo &amp bar</title><h1 class=foo>bar bar</h1><p id=alfred><strong>foo</strong> <em>bar</em></p><button type=button onclick=return!1>Alpha</button>
```

## Install

Install:
[npm][]:

```sh
npm install rehype-preset-minify
Expand Down Expand Up @@ -132,6 +132,8 @@ repository, organisation, or community you agree to abide by its terms.

[chat]: https://spectrum.chat/unified/rehype

[npm]: https://docs.npmjs.com/cli/install

[license]: license

[author]: https://wooorm.com
Expand Down

0 comments on commit 17083b4

Please sign in to comment.