@sprucelabs/spruce-cli
Version:
Command line interface for building Spruce skills.
37 lines • 1.64 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const schema_1 = require("@sprucelabs/schema");
const skillFeature_schema_1 = __importDefault(require("./../../../.spruce/schemas/spruceCli/v2020_07_22/skillFeature.schema"));
const AbstractAction_1 = __importDefault(require("../../AbstractAction"));
class CreateAction extends AbstractAction_1.default {
optionsSchema = optionsSchema;
commandAliases = ['create.skill [destination]'];
invocationMessage = 'Creating your new skill... ⚡️';
async execute(options) {
const codeSuggestion = options.destination
? `cd ${options.destination} && code .`
: `code .`;
return {
hints: [
'This is so much fun! Lets keep moving.',
`When you're ready, go ahead and run \`${codeSuggestion}\` to open vscode.`,
'Once vscode loads, open the terminal and type `spruce setup.vscode`',
"Hint: You're going to want to install all extensions and setup all features (yes for everything).",
'See you there! 💪',
],
};
}
}
exports.default = CreateAction;
const optionsSchema = (0, schema_1.buildSchema)({
id: 'createSkill',
name: 'create skill',
description: 'A skill is a micro-app, focused on delivering personaziled (and discrete) experiences.',
fields: {
...skillFeature_schema_1.default.fields,
},
});
//# sourceMappingURL=CreateAction.js.map