Comparing version 0.0.3 to 0.1.0
{ | ||
"name" : "atropa-cmd", | ||
"version" : "0.0.3", | ||
"version" : "0.1.0", | ||
"main" : "./cmd.js", | ||
@@ -15,9 +15,6 @@ "description" : "Utilities for executing commandlines.", | ||
}, | ||
"repository" : { | ||
"repository" : { | ||
"type" : "git", | ||
"url" : "git://github.com/matthewkastor/atropa-cmd.git" | ||
}, | ||
"optionalDependencies" : { | ||
"colors" : ">=0.6.0-1" | ||
}, | ||
"engines" : { | ||
@@ -24,0 +21,0 @@ "node" : ">=0.8.14" |
@@ -8,6 +8,29 @@ #Atropa CMD | ||
- Write up functions that utilize the command runner and accept a callback as their only argument | ||
- Push or unshift the functions into the queue of an instance of the async or sync register | ||
- Call the registers `process` function to process the queue of functions | ||
- Create an instance of an async or sync register. | ||
- Use the `addCommand` method of the register to add commands to it. | ||
- Set listeners if you need notifications. Set callbacks if you need stdout. | ||
- Call the registers `process` function to process the queue of functions. | ||
For more details see the docs folder, or the comments in the code. The script is really small, it's likely easiest just to read it. | ||
``` | ||
var cmd, syncy; | ||
cmd = require('atropa-cmd'); | ||
function logStdout(err, stdout, stderr) { | ||
console.log(stdout); | ||
} | ||
syncy = new cmd.commandRegister.Synchronous('Syncy'); | ||
syncy.on('command executing', function(e) { | ||
console.log('command executing'); | ||
console.dir(e); | ||
console.log(); | ||
}); | ||
syncy.addCommand('dir', 'C:\\Users\\kastor\\Desktop', logStdout); | ||
syncy.addCommand('tree /A', 'C:\\Users\\kastor\\Desktop', logStdout); | ||
syncy.process(); | ||
``` | ||
For more details see the example script, or the comments in the code. The script is really small, it's likely easiest just to read it. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
35
11876
6
182