Permalink
Browse files

Add bin/ansi2html and npm metadata

  • Loading branch information...
1 parent 99051dd commit cb55e6d94e389176c85ba638936043e1164dd400 @mixu mixu committed Sep 5, 2013
Showing with 20 additions and 3 deletions.
  1. +14 −0 bin/ansi2html
  2. +6 −3 package.json
View
@@ -0,0 +1,14 @@
+#!/usr/bin/env node
+var data = ''
+ , ansi2html = require('../lib/index.js')
+
+process.stdin.on('data', function(chunk) {
+ data += chunk
+})
+
+process.stdin.on('end', function() {
+ // strip escape characters (e.g. git log --color | ansi2html)
+ console.log(ansi2html(data.replace(/\u001B/g, '')))
+})
+
+process.stdin.resume()
View
@@ -3,15 +3,18 @@
, "description": "Convert text with ANSI escape sequences to HTML markup"
, "version": "0.0.0"
, "homepage": "https://github.com/agnoster/ansi2html"
-, "repository":
+, "bin":
+ { "ansi2html": "./bin/ansi2html"
+ }
+, "repository":
{ "url": ""
}
, "main": "./lib/"
-, "engines":
+, "engines":
{ "node": ">0.4"
}
, "dependencies": {}
-, "devDependencies":
+, "devDependencies":
{ "vows": "~0.5.8"
}
, "scripts":

0 comments on commit cb55e6d

Please sign in to comment.