chore(examples): update examples to 2.0.0-beta.14 (#6148)

This commit is contained in:
Sébastien Lorber 2021-12-21 17:49:39 +01:00 committed by GitHub
parent 01b407011a
commit f22eb95194
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 5470 additions and 9435 deletions

View file

@ -10,6 +10,13 @@ const rimraf = require('rimraf');
const {readFileSync, writeFileSync, readdirSync} = require('fs');
const {execSync} = require('child_process');
const NODE_MAJOR_VERSION = parseInt(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
// See https://github.com/facebook/docusaurus/issues/1699