Skip to content

πŸ“„ Babel plugin to minify html templates from as-html.

License

Notifications You must be signed in to change notification settings

DylanPiercey/babel-plugin-as-html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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:

import html from 'as-html'
let output = html`
	<div>
		<section class="super-cool">Hello World!</section>
	</div>
`;

becomes:

import html from 'as-html'
let output = html(['<div><section class="super-cool">Hello World!<\/section><\/div>'])

Contributions

  • Use npm test to run tests.

License

MIT

About

πŸ“„ Babel plugin to minify html templates from as-html.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published