mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-15 01:57:28 +02:00
chore: update node engine version 18 (#9348)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com> Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
parent
a178654446
commit
bde9cfd84d
46 changed files with 54 additions and 64 deletions
|
@ -10,16 +10,6 @@
|
|||
import fs from 'fs-extra';
|
||||
import shell from 'shelljs';
|
||||
|
||||
const NODE_MAJOR_VERSION = parseInt(
|
||||
/** @type {string} */ (process.versions.node.split('.')[0]),
|
||||
10,
|
||||
);
|
||||
if (NODE_MAJOR_VERSION < 16) {
|
||||
throw new Error(
|
||||
'This generateExamples Docusaurus script requires at least Node.js 16 and npm 7. See why here: https://github.com/facebook/docusaurus/pull/5722#issuecomment-948847891',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate one example per init template
|
||||
* We use those generated examples as CodeSandbox projects
|
||||
|
@ -78,9 +68,9 @@ async function generateTemplateExample(template) {
|
|||
hardReloadOnChange: true,
|
||||
view: 'browser',
|
||||
template: 'docusaurus',
|
||||
node: '16',
|
||||
node: '18',
|
||||
container: {
|
||||
node: '16',
|
||||
node: '18',
|
||||
},
|
||||
};
|
||||
await fs.writeFile(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue