UNPKG

poyka

Version:

A framework for interactively creating, extending and maintaining web application as never easier before while doing it in elegant design patterns.

61 lines 4.53 kB
"use strict"; 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()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.InsideExistingProject_Any = void 0; const decova_terminal_1 = require("decova-terminal"); class InsideExistingProject_Any { static _AddUnitTest() { return __awaiter(this, void 0, void 0, function* () { yield decova_terminal_1.CurrentTerminal.HintBeforeLaunchAsync("Press Enter to ensure tsconfig.json"); decova_terminal_1.CurrentTerminal.Exec("npx tsconfig.json"); yield decova_terminal_1.CurrentTerminal.InstructAsync("@File tsconfig.json ..."); yield decova_terminal_1.CurrentTerminal.InstructAsync("... outDir = ./dist"); yield decova_terminal_1.CurrentTerminal.InstructAsync("...@Just under outDir prop ..."); yield decova_terminal_1.CurrentTerminal.InstructAsync("... declaration : true"); yield decova_terminal_1.CurrentTerminal.InstructAsync("... declarationMap : true"); yield decova_terminal_1.CurrentTerminal.InstructAsync("... declarationDir : ./dist"); yield decova_terminal_1.CurrentTerminal.InstructAsync("Make sure [Jasmine Test Explorer] extension is installed."); yield decova_terminal_1.CurrentTerminal.HintBeforeLaunchAsync("Press Enter to install Jasmine and its types"); decova_terminal_1.CurrentTerminal.Exec("npm i --save-dev jasmine"); decova_terminal_1.CurrentTerminal.Exec("npm i @types/jasmine"); yield decova_terminal_1.CurrentTerminal.InstructAsync("@File tsconfig.json ..."); yield decova_terminal_1.CurrentTerminal.InstructAsync("... @include [] property ..."); yield decova_terminal_1.CurrentTerminal.InstructAsync("... add ./spec/**/*.ts"); yield decova_terminal_1.CurrentTerminal.HintBeforeLaunchAsync("Press Enter to create jasmine configuration"); decova_terminal_1.CurrentTerminal.Exec("jasmine init"); yield decova_terminal_1.CurrentTerminal.InstructAsync("@File /spec/support/jasmine.json ..."); yield decova_terminal_1.CurrentTerminal.InstructAsync("... spec_dir : ./dist/spec"); yield decova_terminal_1.CurrentTerminal.InstructAsync("@Dir /spec ..."); yield decova_terminal_1.CurrentTerminal.InstructAsync("... Ensure at least somefile.spec.ts"); yield decova_terminal_1.CurrentTerminal.InstructAsync("@File /spec/someFile.spec.ts ..."); yield decova_terminal_1.CurrentTerminal.InstructAsync("... write a test code sample {describe-it lablablah}"); yield decova_terminal_1.CurrentTerminal.InstructAsync("@src dir"); yield decova_terminal_1.CurrentTerminal.InstructAsync("... Make sure you have at least one .ts file there."); yield decova_terminal_1.CurrentTerminal.HintBeforeLaunchAsync("Press Enter to transpile"); decova_terminal_1.CurrentTerminal.Exec("tsc"); decova_terminal_1.CurrentTerminal.Exec("start \"G:\\GGGBrain\\OneDrive\\GGGHowTo\\ggg VSCode open jasmine test explorer@gui-jasmine.gif\""); yield decova_terminal_1.CurrentTerminal.InstructAsync("If no gif opened: ggg Open Jasmine Test Explorer and make sure you can see your sample test"); }); } static TakeControl() { return __awaiter(this, void 0, void 0, function* () { let ops = { addUnitTest: 'Add Unit Test' }; let op = yield decova_terminal_1.CurrentTerminal.McqAsync('To do with current project:', ops); switch (op) { case ops.addUnitTest: this._AddUnitTest(); break; } }); } } exports.InsideExistingProject_Any = InsideExistingProject_Any; //# sourceMappingURL=InsideExistingProject_Any.js.map