babel-plugin-as-html
A plugin for Babel 6 that removes whitespace and minifies html written using as-html with es2015 template strings.
Installation
$ npm install babel-plugin-as-html --save-dev$ babel --plugins as-html script.js
Example
All template strings tagged with the html
tag will be minified and all unneeded white-space will be removed.
For instance the following tagged template:
let output = html` Hello World! `;
becomes:
let output =
Contributions
- Use
npm test
to run tests.