UNPKG

@paroicms/site-generator-plugin

Version:

ParoiCMS Site Generator Plugin

9 lines (8 loc) 490 B
import { strVal } from "@paroi/data-formatters-lib"; import { resolveModuleDirectory } from "@paroicms/public-server-lib"; import { readFileSync } from "node:fs"; import { dirname, join } from "node:path"; export const projectDir = resolveModuleDirectory(import.meta.url, { parent: true }); export const packageDir = dirname(projectDir); export const pluginVersion = strVal(JSON.parse(readFileSync(join(packageDir, "package.json"), "utf-8")).version); export const SLUG = "site-generator";