Skip to content

Commit

Permalink
Added binary
Browse files Browse the repository at this point in the history
  • Loading branch information
pvorb committed Jan 17, 2012
1 parent 30e6421 commit 3f4c8d5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
16 changes: 16 additions & 0 deletions bin/yamlprompt.js
@@ -0,0 +1,16 @@
#!/usr/bin/env node

var yamlprompt = require('../yamlprompt.js');
var rl = require('readline').createInterface(process.stdin, process.stderr);

yamlprompt(rl, function (err, obj) {
rl.close();
process.stdin.destroy();
if (err)
return console.error(err);
try {
console.log(JSON.stringify(obj));
} catch (err) {
return console.error(err);
}
});
5 changes: 4 additions & 1 deletion package.json
@@ -1,5 +1,5 @@
{
"name": "yamlpromt",
"name": "yamlprompt",
"description": "A prompt that asks for yaml input",
"author": "Paul Vorbach <paul@vorb.de> (http://vorb.de/)",
"tags": [
Expand All @@ -16,6 +16,9 @@
"url": "https://github.com/pvorb/node-yamlprompt/issues"
},
"main": "./yamlprompt.js",
"bin": {
"yamlprompt": "./bin/yamlprompt.js"
},
"engines": {
"node": ">=0.6.0"
},
Expand Down

0 comments on commit 3f4c8d5

Please sign in to comment.