UNPKG

@swell/cli

Version:

Swell's command line interface/utility

35 lines (34 loc) 1.05 kB
import { select } from '@inquirer/prompts'; import { Command } from '@oclif/core'; export default class Create extends Command { static description = 'Scaffold apps, models, functions, and notifications.'; static examples = ['<%= config.bin %> <%= command.id %>']; async run() { const createTarget = await select({ choices: [ { name: 'App', value: 'app', }, { name: 'Model', value: 'model', }, { name: 'Content', value: 'content', }, { name: 'Function', value: 'function', }, { name: 'Notification', value: 'notification', }, ], message: 'What do you want to create?', }); this.log(JSON.stringify(createTarget)); } }