UNPKG

next-start-cli

Version:

This is a CLI tool to create a nextjs project and add the necessary dependencies and configurations

13 lines (12 loc) 363 B
import fs from 'fs/promises'; import path from 'path'; export async function deleteFiles(projectPath, files) { try { for (const file of files) { const filePath = path.join(projectPath, file); await fs.rm(filePath, { recursive: true, force: true }); } } catch (error) { throw new Error(`Failed to clean files: ${error.message}`); } }