UNPKG

create-t3-app-fork

Version:

Create web application with the t3 stack

13 lines (9 loc) 365 B
import type { PackageJson } from "type-fest"; import path from "path"; import fs from "fs-extra"; import { PKG_ROOT } from "../consts"; export const getVersion = () => { const packageJsonPath = path.join(PKG_ROOT, "package.json"); const packageJsonContent = fs.readJSONSync(packageJsonPath) as PackageJson; return packageJsonContent.version ?? "1.0.0"; };