@blitzjs/cli
Version:
Blitz.js CLI
17 lines (16 loc) • 660 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPackageJson = void 0;
const tslib_1 = require("tslib");
const fs_1 = require("fs");
const fs_extra_1 = require("fs-extra");
const utils_1 = require("next/dist/server/lib/utils");
const path_1 = require("path");
const getPackageJson = () => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
const pkgJsonPath = (0, path_1.join)(yield (0, utils_1.getProjectRoot)(process.cwd()), "package.json");
if ((0, fs_1.existsSync)(pkgJsonPath)) {
return (0, fs_extra_1.readJSON)(pkgJsonPath);
}
return;
});
exports.getPackageJson = getPackageJson;