improve intellisense
This commit is contained in:
@ -1,6 +0,0 @@
|
||||
import "typings-global";
|
||||
import * as plugins from "./smartcli.plugins";
|
||||
|
||||
export class Command {
|
||||
|
||||
}
|
@ -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
|
||||
}
|
||||
|
@ -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");
|
Reference in New Issue
Block a user