work in progress

This commit is contained in:
2016-03-14 07:12:00 +01:00
parent fea330b8ff
commit 8f72b3f2af
21 changed files with 2575 additions and 602 deletions

View File

@@ -1,25 +1,25 @@
/// <reference path="typings/tsd.d.ts" />
/// <reference path="./smartcli.plugins.ts" />
/// <reference path="typings/main.d.ts" />
/// <reference path="./smartcli.interfaces.ts" />
/// <reference path="./smartcli.checks.ts" />
/// <reference path="./smartcli.getters.ts" />
/// <reference path="./smartcli.interaction.ts" />
var plugins = smartcliPlugins.init(); //get all the required npm modules under plugins
import plugins = require("./smartcli.plugins");
import SmartcliChecks = require("./smartcli.checks");
/* ------------------------------------------------ *
* ---------- plugins for direct use -------------- *
* ------------------------------------------------ */
export let inquirer = plugins.inquirer; //inquirer is for asking questions
export let cliff = plugins.cliff; // formats cli output
export let argv = plugins.argv; //argv gets initial cli commands and options.
/* ------------------------------------------------ *
* ---------- checks -------------- *
* ------------------------------------------------ */
//define the smartcli object
var smartcli:any = {};
//add plugins from above for direct use
smartcli.inquirer = plugins.inquirer; //inquirer is for asking questions
smartcli.cliff = plugins.cliff; // formats cli output
smartcli.argv = plugins.argv; //argv gets initial cli commands and options.
//init checks. Checks return boolean. That means they can be used as question with an answer of yes or no.
SmartcliChecks.init(); // is defined in smartcli.checks.ts
SmartcliGetters.init(); // is defined in smartcli.getters.ts
SmartcliInteraction.init(); // is defined in smartcli.interaction.ts
module.exports = smartcli; // expose smartcli to outside world