UNPKG

@netlify/content-engine

Version:
18 lines 823 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getGatsbyVersion = getGatsbyVersion; const node_fs_1 = __importDefault(require("node:fs")); const node_path_1 = __importDefault(require("node:path")); const pkg_dir_1 = __importDefault(require("pkg-dir")); let CONTENT_ENGINE_VERSION; function getGatsbyVersion() { if (!CONTENT_ENGINE_VERSION) { const packageJSON = JSON.parse(node_fs_1.default.readFileSync(node_path_1.default.join(pkg_dir_1.default.sync(__dirname), "package.json"), "utf8")); CONTENT_ENGINE_VERSION = packageJSON.version; } return CONTENT_ENGINE_VERSION; } //# sourceMappingURL=get-gatsby-version.js.map