html-uglify
Uglify your HTML and CSS for purposes of compression and obfuscation.
Great for HTML emails.
var HTMLUglify = ;var htmlUglify = salt: 'your-custom-salt' whitelist: '#noform' '#withform' '.someclass' ;var uglified = htmlUglify;
Installation
npm install html-uglify --save
Usage
You pass an html string to .process
and it returns the uglified html.
var HTMLUglify = ;var htmlUglify = salt: 'your-custom-salt' whitelist: ;var htmlString = "<html><head><style>.some-class { color: red; }</style></head><body><h1 class='some-class'>Hello</h1></body></html>"; var uglified = htmlUglify;
Contributing
- Fork it
- Create your feature branch
- Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Running tests
npm installnpm test