templates-mo
Version:
Templates is a scaffolding framework that makes code generation simple, dynamic, and reusable. Generate files, parts of your app, or whole project structures—without the repetitive copy-pasting
30 lines (29 loc) • 1.01 kB
JavaScript
;
/* eslint-disable max-classes-per-file */
Object.defineProperty(exports, "__esModule", { value: true });
exports.FileWriteError = exports.FileExistError = exports.DirectoryNotFoundError = void 0;
class DirectoryNotFoundError extends Error {
constructor(directory) {
super(`Directory does not exist (${directory})`);
this.name = 'DirectoryNotFoundError';
this.path = directory;
Object.setPrototypeOf(this, DirectoryNotFoundError.prototype);
}
}
exports.DirectoryNotFoundError = DirectoryNotFoundError;
class FileExistError extends Error {
constructor(filePath) {
super(`File already exists (${filePath})`);
this.name = 'FileExistError';
this.path = filePath;
}
}
exports.FileExistError = FileExistError;
class FileWriteError extends Error {
constructor(dest) {
super(`File already exists (${dest})`);
this.name = 'FileWriteError';
this.path = dest;
}
}
exports.FileWriteError = FileWriteError;