Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Sensible presets and some tweaks for beautifying HTML with js-beautify according to my preferences.
JavaScript
Branch: master
Failed to load latest commit information.
test tests
.editorconfig dotfiles
.gitattributes dotfiles
.gitignore update ignore patterns, jshintrc
.jshintrc update ignore patterns, jshintrc
.npmignore dotfiles
.verb.md dotfiles
LICENSE update license
README.md build readme
index.js clean up
package.json 1.0.0

README.md

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.

Something went wrong with that request. Please try again.