html-compat
How does it work?
If you simply want to work with an index.html and love ES2015, CSSnext features, all script and style tags inside the html file will be transpiled to more compatible JS/CSS.
Here's nothing magic and worths studying, just a simple short-hand to reduce boilerplate code
Install
npm i -g html-compat
Usage
html-compat input.html -o output.html
# help
html-compat -h
API
const htmlCompat = require('html-compat')
htmlCompat(`<html>html string</html>`, options)
.then(result => {
console.log(result)
})
options
browsers
Type: Array
Default: ['ie > 8', 'last 4 versions']
Support browsers down to this value.
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request :D
Author
html-compat egoist, Released under the MIT License.
Authored and maintained by egoist with help from contributors (list).
egoistian.com · GitHub @egoist · Twitter @rem_rin_rin