node-cmd
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "node-cmd", | ||
"version": "1.0.1", | ||
"description": "Simple commandline interface to allow you to run cli or bash style commands as if you were in the terminal.", | ||
"main": "commandline.js", | ||
"version": "1.0.2", | ||
"description": "Simple commandline/terminal interface to allow you to run cli or bash style commands as if you were in the terminal.", | ||
"main": "cmd.js", | ||
"directories": { | ||
@@ -25,3 +25,3 @@ "example": "example" | ||
"author": "Brandon Nozaki Miller", | ||
"license": "Unlicense", | ||
"license": "DBAD", | ||
"bugs": { | ||
@@ -28,0 +28,0 @@ "url": "https://github.com/RIAEvangelist/node-cmd/issues" |
@@ -1,5 +0,38 @@ | ||
commandline | ||
=========== | ||
*Node.js commandline interface.* | ||
#node-cmd | ||
- | ||
*Node.js commandline/terminal interface.* | ||
Run cli commands asynchronously, and if needed, get the output as a string or just run the command and ignore the output. | ||
Simple commandline or terminal interface to allow you to run cli or bash style commands as if you were in the terminal. | ||
Run commands asynchronously, and if needed can get the output as a string. | ||
#Methods | ||
- | ||
|method | arguments | functionality | | ||
|-------|-----------|---------------| | ||
|run | command | runs a command asynchronously| | ||
|get | command,callback | runs a command asynchronously, when the command is complete all of the stdout will be passed to the callback| | ||
#Examples | ||
- | ||
var cmd=require('node-cmd'); | ||
cmd.get( | ||
'pwd', | ||
function(data){ | ||
console.log('the current working dir is : ',data) | ||
} | ||
); | ||
cmd.run('touch example.created.file'); | ||
cmd.get( | ||
'ls', | ||
function(data){ | ||
console.log('the current dir contains these files :\n\n',data) | ||
} | ||
); | ||
2512
5
38
39