poyka
Version:
A framework for interactively creating, extending and maintaining web application as never easier before while doing it in elegant design patterns.
59 lines • 3.38 kB
JavaScript
;
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DevelopMyTools_Poyka = void 0;
const decova_terminal_1 = require("decova-terminal");
const path_1 = __importDefault(require("path"));
const PackMan_1 = require("../PackMan");
class DevelopMyTools_Poyka {
static _NewBranch() {
return __awaiter(this, void 0, void 0, function* () {
yield decova_terminal_1.CurrentTerminal.InstructAsync("Create [/src/MyBranch/MyBranch.ts]", 'Press ENTER when done.');
yield decova_terminal_1.CurrentTerminal.InstructAsync("Create public static TakeControl() method and use it in the designed place.", 'Press ENTER when done');
});
}
static _EditCodeSnippets() {
return __awaiter(this, void 0, void 0, function* () {
decova_terminal_1.CurrentTerminal.Exec(`cd "${this._projectDir}"`);
yield decova_terminal_1.CurrentTerminal.HintBeforeLaunchAsync('Press ENTER to take you to Poyka/snippets');
decova_terminal_1.CurrentTerminal.Exec(`code ${this._projectDir}`);
decova_terminal_1.CurrentTerminal.Exec(`code ` + path_1.default.join(this._projectDir, `contents`, PackMan_1.CommonFileName.decovaSnippets));
yield decova_terminal_1.CurrentTerminal.InstructAsync(`Make your edits!`, `$$$Press ENTER when done!`);
yield decova_terminal_1.CurrentTerminal.ConfirmAsync(`Ready for publishing Poyka?`);
decova_terminal_1.CurrentTerminal.Exec('ggg "++"');
yield decova_terminal_1.CurrentTerminal.InstructAsync('Ctrl + Shift + B >> Build & Publish', `VOILA`);
});
}
static TakeControl() {
return __awaiter(this, void 0, void 0, function* () {
let ops = { newBranch: 'New branch',
editCodeSnippets: 'Edit code snippets'
};
let selected = yield decova_terminal_1.CurrentTerminal.McqAsync('To do in Poyka:', ops);
switch (selected) {
case ops.newBranch:
this._NewBranch();
break;
case ops.editCodeSnippets:
this._EditCodeSnippets();
break;
default:
throw new Error('Unplanned execution path!');
}
});
}
}
exports.DevelopMyTools_Poyka = DevelopMyTools_Poyka;
DevelopMyTools_Poyka._projectDir = "G:\\_MyProjects\\_MyNodeProjects\\Poyka";
//# sourceMappingURL=DevelopMyTools_Poyka.js.map