2016-06-09 12:03:18 +00:00
|
|
|
"use strict";
|
2016-06-10 01:10:21 +00:00
|
|
|
require("typings-global");
|
|
|
|
var plugins = require("./smartcli.plugins");
|
|
|
|
var Smartcli = (function () {
|
|
|
|
function Smartcli() {
|
|
|
|
this.questionsDone = plugins.q.defer();
|
2016-06-09 12:03:18 +00:00
|
|
|
}
|
2016-06-10 01:10:21 +00:00
|
|
|
Smartcli.prototype.addCommand = function (definitionArg) {
|
|
|
|
var done = plugins.q.defer();
|
|
|
|
if (plugins.argv._.indexOf(definitionArg.commandName) == 0) {
|
|
|
|
done.resolve();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
return done.reject();
|
|
|
|
}
|
|
|
|
return done.promsise;
|
|
|
|
};
|
|
|
|
;
|
|
|
|
Smartcli.prototype.addQuestion = function (definitionArg) {
|
|
|
|
};
|
|
|
|
;
|
|
|
|
Smartcli.prototype.addVersion = function (versionArg) {
|
|
|
|
};
|
|
|
|
Smartcli.prototype.startParse = function () {
|
|
|
|
};
|
|
|
|
return Smartcli;
|
2016-06-09 12:03:18 +00:00
|
|
|
}());
|
2016-06-10 01:10:21 +00:00
|
|
|
exports.Smartcli = Smartcli;
|
2016-06-09 12:03:18 +00:00
|
|
|
|
2016-06-10 01:10:21 +00:00
|
|
|
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0Y2xpLmNsYXNzZXMuc21hcnRjbGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sZ0JBQWdCLENBQUMsQ0FBQTtBQUd4QixJQUFZLE9BQU8sV0FBTSxvQkFDekIsQ0FBQyxDQUQ0QztBQUs3QztJQUlJO1FBQ0ksSUFBSSxDQUFDLGFBQWEsR0FBRyxPQUFPLENBQUMsQ0FBQyxDQUFDLEtBQUssRUFBRSxDQUFDO0lBQzNDLENBQUM7SUFDRCw2QkFBVSxHQUFWLFVBQVcsYUFBa0M7U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