mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 16:17:25 +02:00
fix(core): handle case where package.json is not available at CWD (#7187)
This commit is contained in:
parent
e12947e818
commit
3b32a41f22
6 changed files with 22 additions and 16 deletions
|
@ -16,6 +16,10 @@ export const NODE_MINOR_VERSION = parseInt(
|
|||
10,
|
||||
);
|
||||
|
||||
/** Docusaurus core version. */
|
||||
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
|
||||
export const DOCUSAURUS_VERSION = require('../package.json').version;
|
||||
|
||||
/**
|
||||
* Can be overridden with cli option `--out-dir`. Code should generally use
|
||||
* `context.outDir` instead (which is always absolute and localized).
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
export {
|
||||
NODE_MAJOR_VERSION,
|
||||
NODE_MINOR_VERSION,
|
||||
DOCUSAURUS_VERSION,
|
||||
DEFAULT_BUILD_DIR_NAME,
|
||||
DEFAULT_CONFIG_FILE_NAME,
|
||||
BABEL_CONFIG_FILE_NAME,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue