@mdfriday/foundry
Version:
The core engine of MDFriday. Convert Markdown and shortcodes into fully themed static sites – Hugo-style, powered by TypeScript.
34 lines • 1.17 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Dir = exports.DEFAULT_PUBLISH_DIR = exports.DEFAULT_THEMES_DIR = void 0;
exports.newDir = newDir;
const path_1 = __importDefault(require("path"));
exports.DEFAULT_THEMES_DIR = 'themes';
exports.DEFAULT_PUBLISH_DIR = 'public';
class Dir {
constructor(workingDir, themesDir, publishDir = exports.DEFAULT_PUBLISH_DIR) {
this.workingDir = workingDir;
this.themesDir = themesDir;
this.publishDir = publishDir;
}
getWorkingDir() {
return path_1.default.resolve(this.workingDir);
}
getThemesDir() {
return path_1.default.resolve(this.themesDir);
}
getThemesCacheDir() {
return path_1.default.resolve(this.themesDir, '.cache');
}
getPublishDir() {
return path_1.default.resolve(this.publishDir);
}
}
exports.Dir = Dir;
function newDir(workingDir, themesDir, publishDir) {
return new Dir(workingDir, themesDir, publishDir);
}
//# sourceMappingURL=dir.js.map