New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

autocmdr

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

autocmdr - npm Package Compare versions

Comparing version 0.0.4 to 0.0.6

.travis.yml

2

lib/completion.js

@@ -11,2 +11,4 @@ /* commander/autocmdr component

'use strict';
module.exports = function (program, opts) {

@@ -13,0 +15,0 @@

@@ -6,2 +6,4 @@ /* commander/autocmdr component

'use strict';
module.exports = function (program, opts) {

@@ -8,0 +10,0 @@ var path = require('path');

@@ -6,3 +6,5 @@ /* commander/autocmdr component

'use strict';
module.exports = function (program, opts) {

@@ -9,0 +11,0 @@

@@ -6,2 +6,4 @@ /* commander/autocmdr component

'use strict';
module.exports = function (program, opts) {

@@ -8,0 +10,0 @@

@@ -6,2 +6,4 @@ /* commander/autocmdr component

'use strict';
module.exports = function (program) {

@@ -8,0 +10,0 @@ var winston = require('winston');

@@ -7,2 +7,4 @@ /* commander/autocmdr component

'use strict';
module.exports = function (program, opts) {

@@ -9,0 +11,0 @@ var path = require('path');

@@ -7,2 +7,4 @@ /* commander/autocmdr component

'use strict';
module.exports = function (program) {

@@ -9,0 +11,0 @@

@@ -7,2 +7,4 @@ /* commander/autocmdr component

'use strict';
module.exports = function (program) {

@@ -9,0 +11,0 @@

11

package.json
{
"name": "autocmdr",
"version": "0.0.4",
"version": "0.0.6",
"description": "autocmdr",

@@ -16,12 +16,5 @@ "main": "index.js",

"commander": "~2.0.0",
"eco": "~1.1.0-rc-3",
"editor": "0.0.4",
"winston": "~0.7.2",
"nconf": "~0.6.7",
"didyoumean": "~1.1.0",
"prompt": "~0.2.11",
"async": "~0.2.9",
"xtend": "~2.0.6",
"mkdirp": "~0.3.5",
"win-spawn": "~2.0.0",
"commander-tabtab": "~0.1.0"

@@ -37,4 +30,4 @@ },

"devDependencies": {
"rimraf": "~2.2.2"
"mocha": "~1.12.1"
}
}

@@ -1,23 +0,28 @@

autocmdr
autocmdr [![Build Status](https://secure.travis-ci.org/Hypercubed/autocmdr.png?branch=master)](https://travis-ci.org/Hypercubed/autocmdr) [![NPM version](https://badge.fury.io/js/autocmdr.png)](http://badge.fury.io/js/autocmdr)
=============
This is a work in progress, experiment, proof of concept, and/or waste of time.
autocmdr is a both a command line interface for running tasks and a set of components for building CLIs. autocmdr is designed to work with [generator-commander](https://github.com/Hypercubed/generator-commander) to enable easily building of commander.js command line apps.
# Description
autocmdr itself was partially built using autocmdr/[generator-commander](https://github.com/Hypercubed/generator-commander). Please also see the obligatory todo app here [todo-md](https://github.com/Hypercubed/todo-md) (Works with GFM task lists!!).
autocmdr is a command runner, command builder, and CLI application builder. autocmdr itself was partially built using autocmdr. Also see the obligatory todo app here [todo-md](https://github.com/Hypercubed/todo-md) (Works with GFM task lists!!).
Warning... The usage is changing rapidly. I'm working towards a [0.1.0](https://github.com/Hypercubed/autocmdr/issues?milestone=1) release soon. Feedback is welcome.
[![Gittip donate button](http://badgr.co/gittip/hypercubed.png)](https://www.gittip.com/hypercubed/ "Donate weekly to this project using Gittip")
[![Paypal donate button](http://badgr.co/paypal/donate.png?bg=%23feb13d)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=X7KYR6T9U2NHC "One time donation to this project using Paypal")
# Introduction
The diverse ecosystem of modules available for node.js through npm make it a great tool the rapid development of a variety of tools including useful command line interfaces. [Commander.js](https://github.com/visionmedia/commander.js) from [visionmedia](https://github.com/visionmedia) is an excellent node.js command line parser that, using a natural, clean and highly readable syntax, allows for easy development of versatile self-documenting command line interfaces (CLIs). However, a command line parser is just the beginning. Many CLIs will inevitably need to include additional modules for debug logging, configuration management, and other CLI type actions. autocmdr is a command line tool that implements these modules, so you don't have too. In fact in what I am calling local mode all you need to do is add command modules to your local directory and autocmdr will load them automatically along with a reasonable set of additional support modules. Furthermore, in global mode autocmdr provides tools for easily building and managing these commands. This includes converting a detached set of command modules into a semi-independent CLI application that uses autocmdr (along with all it's support modules) as a library.
The diverse ecosystem of modules available for node.js through npm make it a great tool for the rapid development of a variety of tools including useful command line interfaces. [Commander.js](https://github.com/visionmedia/commander.js) from [visionmedia](https://github.com/visionmedia) is an excellent node.js command line parser that, using a natural, clean and highly readable syntax, allows for easy development of versatile self-documenting command line interfaces (CLIs). However, a command line parser is just the beginning. Many CLIs will inevitably need to include additional components such as debug logging, configuration management, and other CLI type actions. autocmdr is a command line tool that implements these modules, so you don't have too. In fact using the autocmdr executable all you need to do is add commands to your local directory and autocmdr will load them automatically along with a reasonable set of additional support components. Using autocmdr along with [yo](https://github.com/yeoman/yo) and [generator-commander](https://github.com/Hypercubed/generator-commander) provides tools for easily building command components and full CLI applications. This includes converting a detached set of command components into a independent CLI application that uses autocmdr (along with all it's support modules) as a library.
## Philosophy
## Philosophy ad Workflow
autocmdr is a CLI application builder. autocmdr itself is CLI that includes a reasonable set of support modules that enhance its interface. It stands to reason that CLIs built using autocmdr would benefit from using these same modules.
**Building excellent command tools using excellent tools. Using the right tool for the right task**
[commander.js](https://github.com/visionmedia/commander.js) is an node.js command line parser from [visionmedia](https://github.com/visionmedia).
autocmdr is a set of components that add interfaces and support to commander.js based applications built by Hypercubed (me).
[yo](https://github.com/yeoman/yo) is a scaffolding tool built by Google.
[generator-commander](https://github.com/Hypercubed/generator-commander) is a commander.js application generator for Yo also built by Hypercubed.
Yo, together with the commander generator, makes it easy to scaffold complete command line tools that uses commander.js command line parser and autocmdr components to enable great command line interfaces.
# Usage

@@ -27,23 +32,25 @@

Essentially autocmdr works in three modes. Local detached mode, global builder mode (accessed using the `-g` switch on the command line), and library mode. In local mode autocmdr (executing `autocmdr` without the `-g` flag) will load any commands located in the current working directory's (cwd's) `cmds/` folder. By convention each file in the `cmds/` directory corresponds to one commander.js command, although this is not necessary. In this mode it is not necessary to install autocmdr in the current working directory, you are using the global autocmdr executable with the local `cmds/` commands.
Essentially autocmdr, like most node.js modules, works in two modes; executable (command line) mode and library (require) mode. In executable mode autocmdr will load any commands located in the current working directory's (cwd's) `cmds/` folder. By convention each file in the `cmds/` directory corresponds to one commander.js command, although this is not necessary. In this mode it is not necessary to install autocmdr in the current working directory, you are using the global autocmdr executable with the local `cmds/` commands.
In global builder mode (`autocmdr -g`) autocmdr is loaded with commands that enable management of the cwd's command files and building of autocmdr/commader.js CLI apps. You are still working in the cwd, but using the global commands to manage the local commands. See below for more details and examples.
In library mode a commander.js based CLI executable has access to autocmdr components extending its interface.
In library mode a local commander.js based CLI executable is created that has access to autocmdr plug-ins (see below).
## Using autocmdr as a task runner
## Install autocmdr globally
Install autocmdr globally
npm install -g Hypercubed/autocmdr
## Using autocmdr as a task runner (Local detached mode)
When running in executable mode all commands located in the `cmds/` folder of the current working directory are automatically loaded. These commands can be be run by invoking `autocmdr commandname`. `autocmdr --help` will list help on these local commands. By using the globally installed `autocmdr` executable the rest of your project remains untouched so you can add commands to augment existing projects.
When running in local mode (not using the `-g` flag) all commands located in the `cmds/` folder of the current working directory are automatically loaded. These commands can be be run by invoking `autocmdr commandname`. `autocmdr --help` will list help on these local commands. By using the globally installed `autocmdr` executable the rest of your project remains untouched so you can add commands to augment existing projects.
## Using generator-commander to add command components
## Using autocmdr as a command builder (Global builder mode)
Install yo and generator-commander
In global mode (`-g`) you can add and edit commands to the current working directory's `cmds/` folder. Referring to the example below notice that `autocmdr -g add mycmd` call is in global mode to add the `mycmd` to the cwd. The second `autocmdr mycmd` call executes the `mycmd` command. If you change to another directory these commands are no longer available.
npm install -g yo generator-commander
> cd example
> autocmdr -g --help
using yo and generator-commander you can add commands to the current working directory's `cmds/` folder. Referring to the example below `yo commander:command mycmd` will add the `mycmd` command to the cwd's `cmd/` directory. The `autocmdr mycmd` call executes the `mycmd` command. If you change to another directory these commands are no longer available.
$ mkdir example && cd example
$ autocmdr --help
Usage: autocmdr [options] [command]

@@ -53,6 +60,2 @@

add [options] [name] Create a command file.
edit [options] <name> Edit command file.
init [options] [name] Create a new CLI application.
rm [options] <cmdfile> Delete a command.
config [key] [value] Get and set options

@@ -66,3 +69,2 @@ completion Print command completion script

-V, --version output the version number
-g, --global use global autocmdr tasks

@@ -72,12 +74,12 @@ Bug reports, suggestions, updates:

> autocmdr -g add mycmd
$ yo commander:command mycmd
[?] Command name: mycmd
[?] version: 0.0.0
[?] description: A commander command
create cmds/mycmd.js
prompt: name: (mycmd)
prompt: description: ( )
prompt: version: (0.0.0)
info: Initializing command mycmd at cmds\mycmd.js
info: Opening mycmd in editor
info: cmds\mycmd.js was saved!
I'm all done. Add `require('../cmds/mycmd.js')(program);` to your app before program.parse.
> autocmdr --help
$ autocmdr --help

@@ -88,3 +90,3 @@ Usage: autocmdr [options] [command]

mycmd [options]
mycmd [options] A commander command
config [key] [value] Get and set options

@@ -98,3 +100,2 @@ completion Print command completion script

-V, --version output the version number
-g, --global use global autocmdr tasks

@@ -104,80 +105,82 @@ Bug reports, suggestions, updates:

> autocmdr mycmd
> cd ..
> autocmdr mycmd
> error: 'mycmd' is not a known command. See 'autocmdr --help'.
$ autocmdr mycmd
$ cd ..
$ autocmdr mycmd
$ error: 'mycmd' is not a known command. See 'autocmdr --help'.
## Using autocmdr as a app builder (Library mode)
## Using generator-commander
If a set of commands in a folder are useful globally you can convert a set of tasks to an semi-independent commander.js command line application.
If a set of commands in a folder are useful globally you can convert a set of tasks to an self contained commander.js command line application. Notice after running `yo commander` the previously created command `mycmd` is available within the newly created `example` application.
1. Create an independent commander.js based app with autocmdr default plug-ins.
$ cd example
$ yo commander
[?] Name (must be only letters, spaces, or dashes) example
[?] Version: 0.0.0
[?] Description: A commander CLI app
[?] GitHub username:
[?] license: MIT
>[x] Logger (adds a Winston logger)
[x] Commander loader (automatically loads commands from cmds/ directory)
[x] Autocompletion (adds command line autocompletion)
[x] Package (load reasonable defaults from your application's package.json)
[x] Config (adds a config command)
[x] Help (adds a `did you mean` messege when an unknown command is given)
create package.json
create bin/example
create Readme.md
create test/example.js
create .editorconfig
create .jshintrc
create .gitignore
create .travis.yml
I'm all done. Running npm install for you to install the required dependencies. If this fails, try running the command yourself.
$ ./bin/example --help
Usage: example [options] [command]
Commands:
mycmd [options] A commander command
config [key] [value] Get and set options
completion Print command completion script
Options:
-h, --help output usage information
-d, --debug enable debugger
-V, --version output the version number
> cd example
> autocmdr -g init
info: Initializing example
autocmdr: name: (example)
autocmdr: version: (0.0.0)
autocmdr: description: (A autocmdr CLI app)
autocmdr: author: (J. Harshbarger)
autocmdr: license: (MIT)
autocmdr: Is this OK?: (yes)
info: Adding bin/example
info: Adding package.json
info: Adding Readme.md
info: Adding tests/
info: All done. Now trying to run npm to link to autocmdr. Run `npm install` if it fails.
> ./bin/example --help
Usage: example [options] [command]
Commands:
mycmd [options]
config [key] [value] Get and set options
completion Print command completion script
Options:
-h, --help output usage information
-d, --debug enable debugger
-V, --version output the version number
2. (Optional) Make it global
2. Make it global
$ npm link
$ cd ..
$ example --help
Usage: example [options] [command]
Commands:
mycmd [options] A commander command
config [key] [value] Get and set options
completion Print command completion script
Options:
-h, --help output usage information
-d, --debug enable debugger
-V, --version output the version number
> npm link
> cd ..
> example --help
The new executable you just created, when you include the autocmdr components, will have access to the autocmdr features as well as the commands in the `cmds/` folder. Edit `bin/example` to change what components are loaded.
Usage: example [options] [command]
Commands:
mycmd [options]
config [key] [value] Get and set options
completion Print command completion script
Options:
-h, --help output usage information
-d, --debug enable debugger
-V, --version output the version number
The new executable you just created, by default, will have access to the autocmdr plugins as well as the commands in the `cmds/` folder. Edit `bin/example` to change these defaults.
## autocmdr options
You can set options with this the `autocmdr config` command. `autocmdr config` will list all config variables. `autocmdr config name` will get a value, `autocmdr config name value` will set a value. Currently the following config options are available:
`autocmdr -g config author` will get/set the default cli author name
`autocmdr -g config editor` will get/set the default editor
# Commander.js components
Commands and plug-ins are node.js modules that export a single initialization function. This function is called with a commander.js program and an optional options object. Commands and plug-ins have a simple syntax that doesn't deviate far from the syntax established by commander.js itself. See autocmdr's [commands](https://github.com/Hypercubed/autocmdr/tree/master/cmds) and [plug-ins](https://github.com/Hypercubed/autocmdr/tree/master/lib) for examples.
autocmdr components are node.js modules that export a single initialization function. This function is called with a commander.js program and an optional options object. Components have a simple syntax that doesn't deviate far from the syntax established by commander.js itself. See autocmdr's [example commands](https://github.com/Hypercubed/autocmdr/tree/master/cmds) and [lib](https://github.com/Hypercubed/autocmdr/tree/master/lib) for examples.
## Command modules
## Commands
The most basic form of a command module is shown below. Within the function the commander.js program is manipulated to add a single command as any other commander.js program (see [commander.js api documentationn](http://visionmedia.github.io/commander.js/)).
The most basic form of a command component is shown below. Within the exported function a single command is added to the commander.js `program` as you would in any other commander.js program (see [commander.js api documentation](http://visionmedia.github.io/commander.js/)).
module.exports = function (program) {
module.exports = function(program) {

@@ -188,3 +191,3 @@ program

.description('description')
.action(function(opts){
.action(function(args){
// Do something

@@ -195,7 +198,7 @@ });

## Plug-in modules
## Components
autocmdr plug-in modules have the same structure as command modules. The only difference is that they are not designed to be automatically loaded. Plugins are loaded using node's require function again exporting a single initialization function; this time accepting an options object as the second parameter. Below are the built-in autocmdr plug-ins.
autocmdr component modules have the same structure as command modules. The only difference is that they are not designed to be automatically loaded. Plugins are loaded using node's require function again exporting a single initialization function; this time accepting an optional options object as the second parameter. Below are the built-in autocmdr plug-ins.
module.exports = function (program, options) {
module.exports = function(program, options) {

@@ -206,11 +209,13 @@ // Do plug-in stuff here

### loader
# autocmdr supplied components
This plug-in is what loads the `cmds/` modules.
## loader
This component is what loads the `cmds/` modules.
Adding `require('autocmdr/lib/loader.js')(program)` will load all modules in the `cmds` folder just above the executable. This path can be overridden by setting the path option; for example `require('autocmdr/lib/loader.js')(program, { path: path.join(process.cwd(), 'cmds/') )` will load modules from the cwd's `/cmds` folder.
### logger
## logger
The logger plug-in uses [Winston](https://github.com/flatiron/winston) for logging.
The logger component uses [Winston](https://github.com/flatiron/winston) for logging.

@@ -225,5 +230,5 @@ Adding `require('autocmdr/lib/logger')(program)` will add `program.log` to your application. The plug-in will enable output to the terminal depending on the log level. The plug-in will also add the `-d` option to your application to enable debug logging. Then logging can be done like this:

### config
## config
This plug-in will load [nconf](https://github.com/flatiron/nconf) for handling of configuration. It will add program.config as an instance of nconf.
This component will load [nconf](https://github.com/flatiron/nconf) for handling of configuration. It will add program.config as an instance of nconf.

@@ -234,17 +239,17 @@ Adding `require('autocmdr/lib/config')(program)` will enable this.

### help
## help
This plug-in will use [didyoumean](https://github.com/dcporter/didyoumean.js) to add a "Did you mean:" message to your application when an unknown command is given.
This component will use [didyoumean](https://github.com/dcporter/didyoumean.js) to add a "Did you mean:" message to your application when an unknown command is given.
Adding `require('autocmdr/lib/help')(program)` will enable this.
### package
## package
This plug-in will use the will load reasonable defaults (such as description and bug reporting URL) from your application's package.json.
This component will use the will load reasonable defaults (such as description and bug reporting URL) from your application's package.json.
Adding `require('autocmdr/lib/package')(program)` will load the package.json file located one directory above the executable. You can override this path using the options object.
### completion
## completion
This plug-in will use [node-tabtab](https://github.com/mklabs/node-tabtab) to add auto-completion support to your application.
This component will use [node-tabtab](https://github.com/mklabs/node-tabtab) to add auto-completion support to your application.

@@ -256,21 +261,2 @@ Adding `require('autocmdr/lib/completion')(program)` just before `program.parse(argv);` will will enable auto-completion support. You will then need to do one of the following to enable auto-completion in your shell.

### prompt
`var prompt = require('autocmdr/lib/prompt')(program)`
### render
`var render = require('autocmdr/lib/render')(program)`
# Questions
Q: Doesn't flatiron do the same thing? You're even using some flatiron modules! Why not just use [flatiron](https://github.com/flatiron/flatiron) to build your cli applications.
A: Good question with perhaps a few bad answers. Basically it boils down to a few core design choices.
- Autocmdr is just for cli applications (for what it's worth).
- I started working on autocmdr before I realized that flatiron it had cli scaffolding support. As I developed autocmdr I realized more and more how good flatiron was. Only issue I had was it's choice of core support modules.
- Flatiron uses [optimist](https://github.com/substack/node-optimist) for command line parsing. I felt commander.js was a cleaner api so I build autocmdr using that.
- I haven't quite bought [Broadway](https://github.com/flatiron/broadway)'s' for plug-in definitions. That could change. I like that autocmdr's plug-ins and command files are essentially the same things.
- I really like the idea that I can prototype a command line app using autocmdr in local mode before creating a full app. Flatiron itself cannot do this but I'm sure it would be easy enough to build flatiron based tool that does. Also, scaffolding a command is not yet available in flatiron.
- Flatiron has a team working on their framework. Autocmdr is just me. I work on it in my spare time often late at night. I do this because I enjoy it.
# Share

@@ -286,4 +272,8 @@

MIT
[MIT License](http://en.wikipedia.org/wiki/MIT_License)
Copyright (c) 2013 J. Harshbarger
[![Gittip donate button](http://badgr.co/gittip/hypercubed.png)](https://www.gittip.com/hypercubed/ "Donate weekly to this project using Gittip")
[![Paypal donate button](http://badgr.co/paypal/donate.png?bg=%23feb13d)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=X7KYR6T9U2NHC "One time donation to this project using Paypal")
# Acknowledgments

@@ -293,2 +283,2 @@

autocmdr is build on top of [commander.js](https://github.com/visionmedia/commander.js) and inspired by other task managers \( [grunt](https://github.com/gruntjs/grunt), [automaton](https://github.com/IndigoUnited/automaton) \) and command line tools \( [docpad](https://github.com/bevry/docpad), [git](https://github.com/git/git) \) and (of course) [flatiron](https://github.com/flatiron/flatiron).
autocmdr is build on top of [commander.js](https://github.com/visionmedia/commander.js) and inspired by other task managers \( [grunt](https://github.com/gruntjs/grunt), [automaton](https://github.com/IndigoUnited/automaton) \) and command line tools \( [docpad](https://github.com/bevry/docpad), [git](https://github.com/git/git) \).

@@ -0,12 +1,7 @@

'use strict';
var assert = require("assert");
var path = require('path');
var exec = require('child_process').exec;
var fs = require('fs');
var rimraf = require('rimraf');
var mkdirp = require('mkdirp');
var globalCmds = [ 'config', 'completion', 'add', 'edit', 'init', 'rm' ];
describe('autocmdr API', function () {

@@ -26,3 +21,2 @@ var program = require("../");

require('../lib/help.js')(program);
//require('../lib/eco.js')(program);
require('../lib/config.js')(program, { path: path.resolve(__dirname, '../.autocmdr') });

@@ -32,4 +26,2 @@ require('../lib/completion.js')(program);

assert(!!program.log);
//assert(!!program.package);
//assert(!!program.eco);
assert(!!program.config);

@@ -40,27 +32,2 @@

it('should load global cmds without errors', function() {
require('../lib/loader.js')(program, { path: path.resolve(__dirname, '../cmds/'), name: 'autocmdr' });
//assert(!!program.loadCmds);
//assert(!!program.eco);
var cmds = program.commands.map(function(d) { return d._name; });
assert.deepEqual(cmds, globalCmds);
});
// TODO: run in test directory
//it('should add local cmds', function() {
// program.parse(['','','add','XXXtest', '-E']);
//});
//it('should load local cmds', function() {
//require('../lib/loader.js')(program, { path: path.resolve(__dirname, '../cmds/') });
//console.log(program.commands)
//});
//it('should rm local cmds', function() {
// program.parse(['','','rm','XXXtest']);
//});
});

@@ -71,11 +38,2 @@

rimraf.sync('./test/example');
mkdirp.sync('./test/example');
process.chdir('./test/example');
if(path.basename(process.cwd()) !== 'example') {
console.log('Error creating example directory');
process.exit(1);
}
it('--help should run without errors', function(done) {

@@ -121,64 +79,9 @@ exec(cmd+'--help', function (error, stdout, stderr) {

it('init should run without errors', function(done) {
this.timeout(0);
exec(cmd+'-g init -P -l', function (error, stdout, stderr) {
//console.log('\n');
//console.log(stdout);
assert(!error);
assert(fs.existsSync('Readme.md'));
assert(fs.existsSync('package.json'));
assert(fs.existsSync('test'));
done();
});
});
it('add should run without errors', function(done) {
this.timeout(4000);
exec(cmd+'-g add mycmd -P -E', function (error, stdout, stderr) {
//console.log('\n');
//console.log(stdout);
assert(!error);
assert(fs.existsSync('cmds/mycmd.js'));
done();
});
});
/* it('should return error on missing editor', function(done) {
it('should return error on unknown command', function(done) {
this.timeout(4000);
exec(cmd+'-g edit mycmd -e vimmm', function (error, stdout, stderr) {
exec(cmd+'addd', function (error, stdout, stderr) {
//console.log('\n');
console.log(stderr);
assert(error);
assert.equal(error.code,1);
assert(stderr.match(/is not a known command/i));
done();
});
}); */
it('rm should run without errors', function(done) {
this.timeout(4000);
exec(cmd+'-g rm mycmd', function (error, stdout, stderr) {
//console.log('\n');
//console.log(stdout);
assert(!error);
assert(!fs.existsSync('cmds/mycmd.js'));
done();
});
});
it('should return error on unknown command', function(done) {
this.timeout(4000);
exec(cmd+'-g addd', function (error, stdout, stderr) {
//console.log('\n');
//console.log(stdout);
assert(error);

@@ -192,5 +95,5 @@ assert.equal(error.code,1);

it('should return error on missing command', function(done) {
this.timeout(4000);
this.timeout(4000);
exec(cmd+'-g', function (error, stdout, stderr) {
exec(cmd, function (error, stdout, stderr) {
//console.log('\n');

@@ -197,0 +100,0 @@ //console.log(stdout);

@@ -6,9 +6,4 @@ # Todo list for [autocmdr](https://github.com/Hypercubed/autocmdr)

### Priority
- [x] Finish init function
- [-] exec NPM init
- [x] exec `npm link autocmdr` or `npm install --save autocmdr`
- [-] Rename ./.autocmdr and ./autocmdr.js to .myapp and myapp.js
- [-] Make safe for existing files, read package.json content
- [-] Options for which files to add during init
- [ ] exit code on error/abort
- [ ] Finish transition to yo/generator-commander
- [ ] Update example using yo
- [?] Finish config

@@ -21,6 +16,2 @@ - [ ] Autocmdr .autocmdr, then cwd's .autocmdr are loaded

- [-] Use config namespaces (core.editor, add.template, etc)?
- [ ] Template
- [ ] fix autocmdr dependency in package.json
- [x] fix usage in readme.md
- [x] help component to template?
- [ ] Readme

@@ -30,12 +21,9 @@ - [x] Update readme with better intro

- [x] Add description of plug-ins to readme
- [ ] Be consistent in Readme (plug-in, plugin vs. component, executable vs. commander.js app vs. cli)
- [x] Update to latest commander.js
- [-] Autoload autocmdr.js in cwd.
- [?] Document this
- [x] Be consistent in Readme (plug-in, plugin vs. component, executable vs. commander.js app vs. cli)
- [ ] Make final decision on "plug-ins"!!
- [ ] Namespace
- [ ] Plugins vs. components
- [?] Namespace
- [x] Plugins vs. components
- [x] Add prompt and eco to plug-ins?
- [ ] Guidelines for what should be a plug-in / component
- [ ] Parse with callback?
- [-] Parse with callback?

@@ -55,3 +43,3 @@ ### New features / plugins

- [ ] String commands (autocmdr list show)
- [ ] String commands (i.e. autocmdr list show do)
- [ ] Hidden commands?

@@ -63,4 +51,4 @@

- [-] Unit tests
- [ ] Support grunt/automaton tasks?
- [ ] Support for flatiron plug-ins/commands?
- [-] Support grunt/automaton tasks?
- [-] Support for flatiron plug-ins/commands?
- [ ] Properly handle async actions (parse with callback?)

@@ -74,6 +62,6 @@ - [ ] Autoload some mode_modules/.bin? Support external commands?

- [ ] Subcommands?, i.e. autocmdr todo <cmd>
- [ ] Run add on edit.
- [x] Run edit on add.
- [x] Names don't have .js, files do.
- [x] add|edit name[.js], .js is optional
- [-] Run add on edit.
- [-] Run edit on add.
- [-] Names don't have .js, files do.
- [-] add|edit name[.js], .js is optional
- [-] Should autocmdr apps depend only on commander.js, by default?

@@ -80,0 +68,0 @@ - [x] Load 'plugins' to get logging and easy loading

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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