Make HTML file compatible with legacy browsers by transpiling script and style tag.
MIT License
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 😄
npm i -g html-compat
html-compat input.html -o output.html
# help
html-compat -h
const htmlCompat = require('html-compat')
htmlCompat(`<html>html string</html>`, options)
.then(result => {
console.log(result)
})
Type: Array
Default: ['ie > 8', 'last 4 versions']
Support browsers down to this value.
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
html-compat © egoist, Released under the MIT License. Authored and maintained by egoist with help from contributors (list).
egoistian.com · GitHub @egoist · Twitter @_egoistlily