rgen-cli
Version:
A developer CLI for initializing React projects, managing utilities, and scaffolding components, hooks, pages, layouts, routes, and contexts quickly.
17 lines (16 loc) • 566 B
JavaScript
import { Args, Command, Flags } from '@oclif/core';
import Hook from '../../libs/build-hook.js';
export default class MakeHook extends Command {
static args = {
name: Args.string({ description: 'Name of the hook', required: true }),
};
static description = 'Generate a React hook';
static flags = {
desc: Flags.string({ description: 'AI description for React hook.' }),
};
async run() {
const { args, flags } = await this.parse(MakeHook);
const c = new Hook(this, args.name, flags);
c.setup();
}
}