finalize initial starters

This commit is contained in:
dswbx
2025-02-14 13:55:46 +01:00
parent 7d3c76d7c1
commit 3b487ade2a
8 changed files with 180 additions and 64 deletions

View File

@@ -17,9 +17,9 @@ export function getRelativeDistPath() {
return path.relative(process.cwd(), getDistPath());
}
export async function getVersion() {
export async function getVersion(_path: string = "") {
try {
const resolved = path.resolve(getRootPath(), "package.json");
const resolved = path.resolve(getRootPath(), path.join(_path, "package.json"));
const pkg = await readFile(resolved, "utf-8");
if (pkg) {
return JSON.parse(pkg).version ?? "preview";