improve intellisense

This commit is contained in:
2016-08-26 09:21:42 +02:00
parent 643514c64a
commit c115d222c0
17 changed files with 113 additions and 102 deletions

View File

@ -1,6 +0,0 @@
import "typings-global";
import * as plugins from "./smartcli.plugins";
export class Command {
}

View File

@ -14,10 +14,20 @@ export class Smartcli {
this.argv = plugins.argv;
this.questionsDone = plugins.q.defer();
this.parseStarted = plugins.q.defer();
}
};
/**
* adds an alias, meaning one equals the other in terms of triggering associated commands
*/
addAlias(keyArg,aliasArg){
this.argv = this.argv.alias(keyArg,aliasArg);
};
/**
* adds a Command by returning a Promise that reacts to the specific commandString given.
*
* Note: in e.g. "npm install something" the "install" is considered the command.
*/
addCommand(definitionArg:{commandName:string}){
let done = plugins.q.defer();
this.parseStarted.promise
@ -30,6 +40,10 @@ export class Smartcli {
});
return done.promise;
};
/**
* gets a Promise for a command word
*/
getCommandPromise(commandNameArg){
//TODO
}

View File

@ -1,9 +1,10 @@
import "typings-global";
export let argv = require('yargs');
export let beautylog = require("beautylog");
export import beautylog = require("beautylog");
export let cliff = require("cliff");
export let inquirer = require("inquirer");
export import lik = require("lik");
export let path = require("path");
export let q = require("q");
export let smartparam = require("smartparam");
export import q = require("q");
export import smartparam = require("smartparam");