mirror of
https://github.com/google/blockly.git
synced 2025-12-16 14:20:10 +01:00
* refactor(build): Rename "package" gulp task (but not npm script) to "pack" This is to avoid an issue due to "package" being a reserved word in JavaScript, and therefore not a valid export identifier. * refactor(build): Convert gulpfile.js from CJS to ESM. * refactor(build): Convert scripts/gulpfiles/*.js from CJS to ESM * fix(build): Fix eslint warning for @license tag in gulpfile.mjs * chore(build): Remove unused imports * fix(build): Fix incorrect import of gulp-gzip * fix(build): Fix incorrect sourcemaps import reference
26 lines
559 B
JavaScript
26 lines
559 B
JavaScript
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/**
|
|
* @fileoverview Any gulp helper functions.
|
|
*/
|
|
|
|
import Module from "node:module";
|
|
|
|
const require = Module.createRequire(import.meta.url);
|
|
|
|
/**
|
|
* Load and return the contents of package.json.
|
|
*
|
|
* Uses require() rather than import, and clears the require cache, to
|
|
* ensure the loaded package.json data is up to date.
|
|
*/
|
|
export function getPackageJson() {
|
|
delete require.cache[require.resolve('../../package.json')];
|
|
return require('../../package.json');
|
|
}
|
|
|