pretty

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

pretty

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

Install with npm

npm i pretty --save
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>

Install dev dependencies:

node i -d && mocha

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

Jon Schlinkert

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


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