UNPKG

kawkab-frontend

Version:

Kawkab frontend is a frontend library for the Kawkab framework

14 lines (13 loc) 511 B
import { generateFile } from '../utils/stub.js'; export function makeModelCommand(program) { program .command('make:model <name> [module]') .description('Create a new model class in a specific module') .action((name, module = 'main') => { const className = name.charAt(0).toUpperCase() + name.slice(1); const targetPath = `app/${module}/models/${className}.ts`; generateFile('model.stub', targetPath, { ClassName: className, }); }); }