import {NodePlopAPI} from "plop"; import {NODE_MODULE_PATH} from "../../utils/constants"; export default function nestNewProjectGenerator(plop: NodePlopAPI) { plop.setGenerator('nest:new:project', { description: 'new nest project', prompts: [ { type: 'input', name: 'projectName', message: 'Enter the project name', }, ], actions: [ { type: 'runCommand', command: 'nest new {{ projectName }} -s', } as any, { type: 'addMany', destination: './{{ dashCase projectName }}', templateFiles: `${NODE_MODULE_PATH}/templates/nest/new-project/**`, base: `${NODE_MODULE_PATH}/templates/nest/new-project/`, force: true, }, { type: 'runCommand', command: 'cd {{ dashCase projectName }} && npm install' } as any, ], }); }