Launch Week Day 3: Introducing Organization Notifications in Socket.Learn More
Socket
Book a DemoSign in
Socket

html

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html - npm Package Compare versions

Comparing version
0.0.1
to
0.0.2
img/after.png

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

+1
-2
#!/usr/bin/env node
var sys = require("sys"),
html = require("../lib/html");
var html = require("../lib/html");

@@ -6,0 +5,0 @@ var args = process.argv.slice(0);

{ "name": "html"
, "version": "0.0.1"
, "version": "0.0.2"
, "engines": [ "node >=0.4.0" ]

@@ -4,0 +4,0 @@ , "description": "HTML pretty printer."

@@ -29,2 +29,20 @@ # commonjs html prettyprinter

</h2>
````
````
## Advanced usage
I find myself constantly using the 'Copy as HTML' feature of the Chrome Inspector:
![Copy as HTML](https://github.com/maxogden/commonjs-html-prettyprinter/raw/master/img/copyashtml.png)
The downside is that that usually the HTML that gets copied is pretty ugly:
![Before pretty printing](https://github.com/maxogden/commonjs-html-prettyprinter/raw/master/img/before.png)
On OS X you can use `pbpaste` and `pbcopy` to stream your clipboard in and out of unix pipes. With the ugly HTML still in your clipboard run this command:
`pbpaste | html | pbcopy`
Now when you paste your clipboard into an editor you will get nice, pretty printed HTML:
![After pretty printing](https://github.com/maxogden/commonjs-html-prettyprinter/raw/master/img/after.png)