w-data-html-minify

1.0.7 • Public • Published

w-data-html-minify

A tool for minify html.

language npm version license gzip file size npm download npm download jsdelivr download

Documentation

To view documentation or get support, visit docs.

Installation

Using npm(ES6 module):

Note: w-data-html-minify is mainly dependent on html-minifier.

npm i w-data-html-minify

Example:

Link: [dev source code]

import wdhm from './src/WDataHtmlMinify.mjs'
// import wdhm from './dist/w-data-html-minify.umd.js'
// import wdhm from 'w-data-html-minify'

let hin = `
<html>
    <head></head>
    <body>abc</body>
</html>
`
let hout = wdhm(hin)
console.log(hout)
// => <html><head></head><body>abc</body></html>

In a browser(UMD module):

Note: w-data-html-minify does not dependent on any package.

[Necessary] Add script for w-data-html-minify.

<script src="https://cdn.jsdelivr.net/npm/w-data-html-minify@1.0.7/dist/w-data-html-minify.umd.js"></script>

minify html: ex-html-minify.html [source code]

let wdhm = window['w-data-html-minify']
// console.log(wdhm)

let hin = `
<html>
    <head></head>
    <body>abc</body>
</html>
`
let hout = wdhm(hin)
console.log(hout)
// => <html><head></head><body>abc</body></html>

Package Sidebar

Install

npm i w-data-html-minify

Weekly Downloads

3

Version

1.0.7

License

MIT

Unpacked Size

3.36 MB

Total Files

62

Last publish

Collaborators

  • semisphere