1.0.1 • Published 5 years ago

babel-plugin-transform-minify-html-template v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

��# babel-plugin-transform-minify-html-template

A plugin for Babel 7 that removes whitespace and minifies html written using template strings

Installation

$ npm install babel-plugin-transform-minify-html-template --save-dev
$ babel --plugins babel-plugin-transform-minify-html-template script.js

Usage

All template strings tagged with the html tag will be minified and all unneeded white-space will be removed.

For instance:

let html = html`
	<div>
		<section class="awesome">hi there!</section>
	</div>
`;

becomes:

var html = "<div><section class=\"awesome\">hi there!<\/section><\/div>"

License

Copyright (c) 2018 Aziz Gazanchiian. Released under the MIT license.