Skip to content

yuda-lyu/w-data-html-minify

Repository files navigation

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>

About

No description, website, or topics provided.

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published