rehype-minify-json-script
rehype plugin to minify `script` elements with a JSON body
Last updated 4 months ago by wooorm .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install rehype-minify-json-script 
SYNC missed versions from official npm registry.

rehype-minify-json-script

Build Coverage Downloads Size Sponsors Backers Chat

Minify script elements with a JSON body.

Install

npm:

npm install rehype-minify-json-script

Example

In
<script type="application/ld+json">
{
  "@context": {
    "name": "http://xmlns.com/foaf/0.1/name",
    "@id": "http://me.example.com",
    "@type": "Person",
    "name": "John Smith",
    "homepage": "http://www.example.com/"
  }
}
</script>
Out
<script type="application/ld+json">{"@context":{"name":"John Smith","@id":"http://me.example.com","@type":"Person","homepage":"http://www.example.com/"}}</script>

Contribute

See contributing.md in rehypejs/.github for ways to get started. See support.md for ways to get help.

This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.

License

MIT © Titus Wormer

Current Tags

  • 2.0.2                                ...           latest (4 months ago)

5 Versions

  • 2.0.2                                ...           4 months ago
  • 2.0.1                                ...           7 months ago
  • 2.0.0                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           4 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 6
Last Day 0
Last Week 3
Last Month 2
Dev Dependencies (0)
None
Dependents (2)

Copyright 2014 - 2016 © taobao.org |