zivester / pretty

Sensible presets and some tweaks for beautifying HTML with js-beautify according to my preferences.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pretty NPM version

Some tweaks for beautifying HTML with js-beautify according to my preferences.

Install with npm

npm i pretty --save

Usage

var pretty = require('pretty');

pretty(STRING_OF_HTML_HERE);

Before

<!DOCTYPE html> <html lang="en"> <head> 
<meta charset="UTF-8"> <title>Home</title> 
</head> <body> This is content. </body> </html>

After

<!DOCTYPE html>
  <html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Home</title>
  </head>
  <body>
    This is content.
  </body>
</html>

Run tests

Install dev dependencies:

node i -d && mocha

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

Copyright (c) 2015 Jon Schlinkert
Released under the MIT license


This file was generated by verb on January 04, 2015.

About

Sensible presets and some tweaks for beautifying HTML with js-beautify according to my preferences.

License:MIT License


Languages

Language:JavaScript 100.0%