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