UNPKG

create-types-backend

Version:

A CLI tool to quickly setup an Express.js backend in TypeScript, using essential configurations and user's preferences.

12 lines (11 loc) 441 B
import path from "path"; import fs from "fs"; import chalk from "chalk"; export const createRootDirectory = (projectName) => { console.log("\n"); console.log(chalk.green(`📂 Setting Up Project: ${projectName}`)); const projectPath = path.join(process.cwd(), projectName); fs.mkdirSync(projectPath, { recursive: true }); // change the current working directory of the Node.js process. process.chdir(projectPath); };