UNPKG

storybook-framework-cedarjs

Version:
14 lines (13 loc) 329 B
import fs from "node:fs"; import path from "path"; function readPackageJson() { const packageJsonPath = path.resolve("package.json"); if (!fs.existsSync(packageJsonPath)) { return false; } const jsonContent = fs.readFileSync(packageJsonPath, "utf8"); return JSON.parse(jsonContent); } export { readPackageJson };