kawkab-frontend
Version:
Kawkab frontend is a frontend library for the Kawkab framework
14 lines (13 loc) • 496 B
JavaScript
import { generateFile } from '../utils/stub.js';
export function makeLayoutCommand(program) {
program
.command('make:layout <name> [module]')
.description('Create a new layout component in a specific module')
.action((name, module = 'main') => {
const layoutName = name.toLowerCase();
const targetPath = `app/${module}/${layoutName}/layout.tsx`;
generateFile('layout.stub', targetPath, {
LayoutName: 'layout',
});
});
}