UNPKG

rgen-cli

Version:

A developer CLI for initializing React projects, managing utilities, and scaffolding components, hooks, pages, layouts, routes, and contexts quickly.

18 lines (17 loc) 661 B
import { Args, Command, Flags } from '@oclif/core'; // eslint-disable-next-line import/no-unresolved import Component from '../../libs/build-component.js'; export default class MakeComponent extends Command { static args = { name: Args.string({ description: 'Name of the component', required: true }), }; static description = 'Generate a React component'; static flags = { desc: Flags.string({ description: 'AI description for React component.' }), }; async run() { const { args, flags } = await this.parse(MakeComponent); const c = new Component(this, args.name, flags); await c.setup(); } }