0.1.0 • Published 7 years ago

html-compat v0.1.0

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

html-compat

NPM version NPM downloads Build Status donate

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

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. 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