Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

atropa-cmd

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

atropa-cmd - npm Package Compare versions

Comparing version 0.0.3 to 0.1.0

atropa-cmd.js

7

package.json
{
"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.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc