UNPKG

@sprucelabs/spruce-cli

Version:

Command line interface for building Spruce skills.

55 lines 2.23 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.renderEnter = renderEnter; exports.renderCommand = renderCommand; const spruce_skill_utils_1 = require("@sprucelabs/spruce-skill-utils"); const graphicsInterface_types_1 = require("../../../types/graphicsInterface.types"); const feature_utilities_1 = __importDefault(require("../../feature.utilities")); const script = [ async (player) => { player.ui.clear(); await renderEnter(player); }, "You push the door open and enter into the largest room you've ever seen.", "So big, in fact, you can't see where the floors end and the walls begin.", 'A familiar voice echos...', '"Hey! It\'s Sprucebot again! 🌲🤖"', async (player) => { const line = `This is so much fun! I love playing both the narrator and a character!`; player.ui.renderLine(line, [graphicsInterface_types_1.GraphicsTextEffect.Italic]); player.ui.renderLine(''); }, 'Anyway... "How about we create a simple todo app."', '"Go ahead and run"', async (player) => { renderCommand(player.ui, 'spruce create.skill todos'); }, '"Tip! If you ever get lost, just run"', async (player) => { renderCommand(player.ui, `spruce onboard`); }, '"and I\'ll get you back on track."', async (player) => { await player.ui.waitForEnter('"Lets do it!"'); player.onboardingStore.setMode('short'); player.onboardingStore.setStage(feature_utilities_1.default.generateCommand('skill', 'create')); }, ]; function renderEnter(player) { return player.ui.renderImage(spruce_skill_utils_1.diskUtil.resolvePath(__dirname, '../../../../docs/images/inside.jpg'), { width: 100, height: 35, }); } function renderCommand(ui, command) { ui.renderLine(command, [ graphicsInterface_types_1.GraphicsTextEffect.BgMagenta, graphicsInterface_types_1.GraphicsTextEffect.White, ]); ui.renderLine(''); } exports.default = script; //# sourceMappingURL=onboarding.short.script.js.map