UNPKG

@schemifyjs/core

Version:

Core module of the SchemifyJS CLI. Provides reusable functions such as scaffolding, template handling, and general utilities.

13 lines (12 loc) 387 B
import fs from 'fs-extra'; export class ProjectAlreadyExistsError extends Error { constructor(projectPath) { super(`A project already exists at: ${projectPath}`); this.name = 'ProjectAlreadyExistsError'; } static validate(projectPath) { if (fs.existsSync(projectPath)) { throw new ProjectAlreadyExistsError(projectPath); } } }