storybook-framework-cedarjs
Version:
Storybook for CedarJS
14 lines (13 loc) • 329 B
JavaScript
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
};