mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-30 09:27:04 +02:00
chore(examples): update examples to 2.0.0-beta.14 (#6148)
This commit is contained in:
parent
01b407011a
commit
f22eb95194
16 changed files with 5470 additions and 9435 deletions
|
@ -26,8 +26,16 @@ This command generates static content into the `build` directory and can be serv
|
|||
|
||||
### Deployment
|
||||
|
||||
Using SSH:
|
||||
|
||||
```
|
||||
$ GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
|
||||
$ USE_SSH=true yarn deploy
|
||||
```
|
||||
|
||||
Not using SSH:
|
||||
|
||||
```
|
||||
$ GIT_USER=<Your GitHub username> yarn deploy
|
||||
```
|
||||
|
||||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
|
||||
|
|
|
@ -32,4 +32,4 @@ npx docusaurus start
|
|||
|
||||
Your site starts at `http://localhost:3000`.
|
||||
|
||||
Open `docs/intro.md` and edit some lines: the site **reloads automatically** and display your changes.
|
||||
Open `docs/intro.md` and edit some lines: the site **reloads automatically** and displays your changes.
|
||||
|
|
|
@ -18,19 +18,19 @@ const config = {
|
|||
|
||||
presets: [
|
||||
[
|
||||
'@docusaurus/preset-classic',
|
||||
'classic',
|
||||
/** @type {import('@docusaurus/preset-classic').Options} */
|
||||
({
|
||||
docs: {
|
||||
sidebarPath: require.resolve('./sidebars.js'),
|
||||
// Please change this to your repo.
|
||||
editUrl: 'https://github.com/facebook/docusaurus/edit/main/website/',
|
||||
editUrl: 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
||||
},
|
||||
blog: {
|
||||
showReadingTime: true,
|
||||
// Please change this to your repo.
|
||||
editUrl:
|
||||
'https://github.com/facebook/docusaurus/edit/main/website/blog/',
|
||||
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
||||
},
|
||||
theme: {
|
||||
customCss: require.resolve('./src/css/custom.css'),
|
||||
|
|
|
@ -16,21 +16,18 @@
|
|||
"dev": "docusaurus start"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "2.0.0-beta.8",
|
||||
"@docusaurus/preset-classic": "2.0.0-beta.8",
|
||||
"@docusaurus/core": "2.0.0-beta.14",
|
||||
"@docusaurus/preset-classic": "2.0.0-beta.14",
|
||||
"@mdx-js/react": "^1.6.21",
|
||||
"@svgr/webpack": "^5.5.0",
|
||||
"clsx": "^1.1.1",
|
||||
"file-loader": "^6.2.0",
|
||||
"prism-react-renderer": "^1.2.1",
|
||||
"react": "^17.0.1",
|
||||
"react-dom": "^17.0.1",
|
||||
"url-loader": "^4.1.1"
|
||||
"react-dom": "^17.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@docusaurus/module-type-aliases": "2.0.0-beta.8",
|
||||
"@docusaurus/module-type-aliases": "2.0.0-beta.14",
|
||||
"@tsconfig/docusaurus": "^1.0.4",
|
||||
"typescript": "^4.3.5"
|
||||
"typescript": "^4.5.2"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -26,8 +26,16 @@ This command generates static content into the `build` directory and can be serv
|
|||
|
||||
### Deployment
|
||||
|
||||
Using SSH:
|
||||
|
||||
```
|
||||
$ GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
|
||||
$ USE_SSH=true yarn deploy
|
||||
```
|
||||
|
||||
Not using SSH:
|
||||
|
||||
```
|
||||
$ GIT_USER=<Your GitHub username> yarn deploy
|
||||
```
|
||||
|
||||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
|
||||
|
|
|
@ -32,4 +32,4 @@ npx docusaurus start
|
|||
|
||||
Your site starts at `http://localhost:3000`.
|
||||
|
||||
Open `docs/intro.md` and edit some lines: the site **reloads automatically** and display your changes.
|
||||
Open `docs/intro.md` and edit some lines: the site **reloads automatically** and displays your changes.
|
||||
|
|
|
@ -18,19 +18,19 @@ const config = {
|
|||
|
||||
presets: [
|
||||
[
|
||||
'@docusaurus/preset-classic',
|
||||
'classic',
|
||||
/** @type {import('@docusaurus/preset-classic').Options} */
|
||||
({
|
||||
docs: {
|
||||
sidebarPath: require.resolve('./sidebars.js'),
|
||||
// Please change this to your repo.
|
||||
editUrl: 'https://github.com/facebook/docusaurus/edit/main/website/',
|
||||
editUrl: 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
||||
},
|
||||
blog: {
|
||||
showReadingTime: true,
|
||||
// Please change this to your repo.
|
||||
editUrl:
|
||||
'https://github.com/facebook/docusaurus/edit/main/website/blog/',
|
||||
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
||||
},
|
||||
theme: {
|
||||
customCss: require.resolve('./src/css/custom.css'),
|
||||
|
|
|
@ -15,16 +15,13 @@
|
|||
"dev": "docusaurus start"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "2.0.0-beta.8",
|
||||
"@docusaurus/preset-classic": "2.0.0-beta.8",
|
||||
"@docusaurus/core": "2.0.0-beta.14",
|
||||
"@docusaurus/preset-classic": "2.0.0-beta.14",
|
||||
"@mdx-js/react": "^1.6.21",
|
||||
"@svgr/webpack": "^5.5.0",
|
||||
"clsx": "^1.1.1",
|
||||
"file-loader": "^6.2.0",
|
||||
"prism-react-renderer": "^1.2.1",
|
||||
"react": "^17.0.1",
|
||||
"react-dom": "^17.0.1",
|
||||
"url-loader": "^4.1.1"
|
||||
"react-dom": "^17.0.1"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -23,7 +23,7 @@ module.exports = {
|
|||
parserOptions: {
|
||||
allowImportExportEverywhere: true,
|
||||
},
|
||||
extends: ['airbnb', 'prettier', 'prettier/react'],
|
||||
extends: ['airbnb', 'prettier'],
|
||||
plugins: ['react-hooks', 'header'],
|
||||
rules: {
|
||||
// Ignore certain webpack alias because it can't be resolved
|
||||
|
@ -56,5 +56,12 @@ module.exports = {
|
|||
'react/jsx-filename-extension': OFF,
|
||||
'react-hooks/rules-of-hooks': ERROR,
|
||||
'react/prop-types': OFF, // PropTypes aren't used much these days.
|
||||
'react/function-component-definition': [
|
||||
WARNING,
|
||||
{
|
||||
namedComponents: 'function-declaration',
|
||||
unnamedComponents: 'arrow-function',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
|
@ -26,8 +26,16 @@ This command generates static content into the `build` directory and can be serv
|
|||
|
||||
### Deployment
|
||||
|
||||
Using SSH:
|
||||
|
||||
```
|
||||
$ GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
|
||||
$ USE_SSH=true yarn deploy
|
||||
```
|
||||
|
||||
Not using SSH:
|
||||
|
||||
```
|
||||
$ GIT_USER=<Your GitHub username> yarn deploy
|
||||
```
|
||||
|
||||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
|
||||
|
|
|
@ -23,19 +23,20 @@ const config = {
|
|||
|
||||
presets: [
|
||||
[
|
||||
'@docusaurus/preset-classic',
|
||||
'classic',
|
||||
/** @type {import('@docusaurus/preset-classic').Options} */
|
||||
({
|
||||
docs: {
|
||||
sidebarPath: require.resolve('./sidebars.js'),
|
||||
// Please change this to your repo.
|
||||
editUrl: 'https://github.com/facebook/docusaurus/edit/main/website/',
|
||||
editUrl:
|
||||
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
||||
},
|
||||
blog: {
|
||||
showReadingTime: true,
|
||||
// Please change this to your repo.
|
||||
editUrl:
|
||||
'https://github.com/facebook/docusaurus/edit/main/website/blog/',
|
||||
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
||||
},
|
||||
theme: {
|
||||
customCss: require.resolve('./src/css/custom.css'),
|
||||
|
|
|
@ -19,26 +19,23 @@
|
|||
"dev": "docusaurus start"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "2.0.0-beta.8",
|
||||
"@docusaurus/preset-classic": "2.0.0-beta.8",
|
||||
"@docusaurus/core": "2.0.0-beta.14",
|
||||
"@docusaurus/preset-classic": "2.0.0-beta.14",
|
||||
"@mdx-js/react": "^1.6.21",
|
||||
"@svgr/webpack": "^5.5.0",
|
||||
"clsx": "^1.1.1",
|
||||
"file-loader": "^6.2.0",
|
||||
"react": "^17.0.1",
|
||||
"react-dom": "^17.0.1",
|
||||
"url-loader": "^4.1.1"
|
||||
"react-dom": "^17.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/eslint-parser": "^7.16.3",
|
||||
"eslint": "^7.20.0",
|
||||
"eslint-config-airbnb": "^18.2.1",
|
||||
"eslint-config-prettier": "^6.15.0",
|
||||
"eslint-plugin-header": "^3.0.0",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"eslint-plugin-jsx-a11y": "^6.4.1",
|
||||
"eslint-plugin-react": "^7.21.5",
|
||||
"eslint-plugin-react-hooks": "^4.2.0",
|
||||
"eslint": "^8.2.0",
|
||||
"eslint-config-airbnb": "^19.0.0",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-plugin-header": "^3.1.1",
|
||||
"eslint-plugin-import": "^2.25.3",
|
||||
"eslint-plugin-jsx-a11y": "^6.5.1",
|
||||
"eslint-plugin-react": "^7.27.0",
|
||||
"eslint-plugin-react-hooks": "^4.3.0",
|
||||
"prettier": "^2.5.0",
|
||||
"stylelint": "^13.2.1"
|
||||
},
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue