Merge pull request #19297 from antobinary/docs-drop-yarn
docs: use npm only - drop yarn
This commit is contained in:
commit
30524c1ee0
10
.github/workflows/deploy-docs.yml
vendored
10
.github/workflows/deploy-docs.yml
vendored
@ -25,17 +25,17 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
cache: yarn
|
||||
cache-dependency-path: ./docs/yarn.lock
|
||||
node-version: 20
|
||||
cache: npm
|
||||
cache-dependency-path: ./docs/package-lock.json
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
run: npm ci
|
||||
|
||||
# Build static docs
|
||||
- name: Build all versions
|
||||
run: ./build.sh
|
||||
- name: Build website
|
||||
run: yarn build
|
||||
run: npm run docusaurus build
|
||||
- name: upload build artifact
|
||||
uses: actions/upload-pages-artifact@v1
|
||||
with:
|
||||
|
@ -5,11 +5,34 @@ and GitHub Actions (see [deploy-docs.yml](../.github/workflows/deploy-docs.yml))
|
||||
|
||||
## Local Development
|
||||
|
||||
To test build the docs locally you can either use `yarn` or `npm`.
|
||||
To test build the docs locally use:
|
||||
|
||||
```bash
|
||||
$ npm ci # install docusaurus and dependencies (based on the package-lock.json file)
|
||||
$ npx docusaurus start # start local dev server
|
||||
```
|
||||
|
||||
By default `docusaurus.config.js` contains instructions for the building of a few extra branches. You may want to drop all but the current branch. For example:
|
||||
|
||||
```
|
||||
$ yarn install # install docusaurus and dependencies
|
||||
$ yarn start # start local dev server
|
||||
diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js
|
||||
index 50b72b12ec..04f360a955 100644
|
||||
--- a/docs/docusaurus.config.js
|
||||
+++ b/docs/docusaurus.config.js
|
||||
@@ -38,12 +38,6 @@ const config = {
|
||||
lastVersion: '2.7',
|
||||
includeCurrentVersion: false,
|
||||
versions: {
|
||||
- '2.5-legacy': {
|
||||
- banner: 'none'
|
||||
- },
|
||||
- '2.6': {
|
||||
- banner: 'none'
|
||||
- },
|
||||
'2.7': {
|
||||
banner: 'none'
|
||||
},
|
||||
|
||||
```
|
||||
|
||||
The last command starts a local development server and opens up a browser window.
|
||||
@ -23,15 +46,15 @@ otherwise git will refuse to change branches.
|
||||
This step is optional and if you don't run it, docusaurus will only build the
|
||||
currently checkout out version which is recommended for local development
|
||||
(building all the versions locally can lead to problems with the live
|
||||
updates when using `yarn start`).
|
||||
updates when using `npx docusaurus start`).
|
||||
|
||||
### Build
|
||||
|
||||
If you only want to build the docs you can run:
|
||||
|
||||
```
|
||||
$ yarn clear # ensure cached content is not interfering with your changes
|
||||
$ yarn build
|
||||
$ npm clear # ensure cached content is not interfering with your changes
|
||||
$ npx docusaurus build
|
||||
```
|
||||
|
||||
This command generates static content into the `build` directory
|
||||
@ -44,7 +67,7 @@ in development or when building the docs.
|
||||
To avoid this you can run:
|
||||
|
||||
```
|
||||
$ yarn clear # ensure cached content is not interfering with your changes
|
||||
$ npx docusaurus clear # ensure cached content is not interfering with your changes
|
||||
$ rm -r versioned_docs versioned_sidebars versions.json # if you build multiple versions
|
||||
```
|
||||
|
||||
|
5
docs/build.sh
Executable file → Normal file
5
docs/build.sh
Executable file → Normal file
@ -13,7 +13,6 @@ TAGS=(
|
||||
BRANCHES=(
|
||||
v2.6.x-release
|
||||
v2.7.x-release
|
||||
# v2.8.x-release
|
||||
)
|
||||
REMOTE="origin"
|
||||
|
||||
@ -31,7 +30,7 @@ for tag in "${TAGS[@]}"; do
|
||||
if [ -f docusaurus.config.js ]; then
|
||||
version=${tag:1:3}-legacy
|
||||
echo "Adding documentation for $version"
|
||||
yarn docusaurus docs:version "${version}"
|
||||
npm run docusaurus docs:version "${version}"
|
||||
else
|
||||
echo "Warning: branch/tag $(version) does not contain a docusaurus.config.js!"
|
||||
fi
|
||||
@ -48,7 +47,7 @@ for branch in "${BRANCHES[@]}"; do
|
||||
if [ -f docusaurus.config.js ]; then
|
||||
version=${branch:1:3}
|
||||
echo "Adding documentation for $version"
|
||||
yarn docusaurus docs:version "${version}"
|
||||
npm run docusaurus docs:version "${version}"
|
||||
else
|
||||
echo "Warning: branch $(branch) does not contain a docusaurus.config.js!"
|
||||
fi
|
||||
|
@ -237,7 +237,7 @@ In Greenlight, room URLs contain the username of the owner, which might also be
|
||||
|
||||
### Terms of Service
|
||||
|
||||
Greenlight supports displaying of terms and conditions for registered users or upon registration. See [adding-terms-and-conditions](/greenlight/config#adding-terms-and-conditions)
|
||||
Greenlight supports displaying of terms and conditions for registered users or upon registration.
|
||||
|
||||
### All recordings are always accessible
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
// @ts-check
|
||||
// Note: type annotations allow type checking and IDEs autocompletion
|
||||
|
||||
const lightCodeTheme = require('prism-react-renderer/themes/github');
|
||||
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
|
||||
const lightCodeTheme = require('prism-react-renderer').themes.github;
|
||||
const darkCodeTheme = require('prism-react-renderer').themes.dracula;
|
||||
|
||||
/** @type {import('@docusaurus/types').Config} */
|
||||
const config = {
|
||||
|
1040
docs/package-lock.json
generated
1040
docs/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -3,32 +3,26 @@
|
||||
"version": "0.0.1",
|
||||
"private": false,
|
||||
"scripts": {
|
||||
"docusaurus": "docusaurus",
|
||||
"start": "docusaurus start",
|
||||
"build": "docusaurus build",
|
||||
"swizzle": "docusaurus swizzle",
|
||||
"deploy": "docusaurus deploy",
|
||||
"clear": "docusaurus clear",
|
||||
"serve": "docusaurus serve",
|
||||
"write-translations": "docusaurus write-translations",
|
||||
"write-heading-ids": "docusaurus write-heading-ids",
|
||||
"typecheck": "tsc"
|
||||
"docusaurus": "npx docusaurus",
|
||||
"start": "npx docusaurus start",
|
||||
"build": "npx docusaurus build",
|
||||
"deploy": "npx docusaurus deploy",
|
||||
"serve": "npx docusaurus serve"
|
||||
},
|
||||
"dependencies": {
|
||||
"@cmfcmf/docusaurus-search-local": "^0.11.0",
|
||||
"@docusaurus/core": "^3.0.1",
|
||||
"@cmfcmf/docusaurus-search-local": "^1.1.0",
|
||||
"@docusaurus/core": "3.0.1",
|
||||
"@docusaurus/plugin-client-redirects": "^3.0.1",
|
||||
"@docusaurus/preset-classic": "^3.0.1",
|
||||
"@mdx-js/react": "^1.6.22",
|
||||
"clsx": "^1.2.1",
|
||||
"prism-react-renderer": "^1.3.5",
|
||||
"react": "^18.0.2",
|
||||
"react-dom": "^18.0.2"
|
||||
"@docusaurus/preset-classic": "3.0.1",
|
||||
"@mdx-js/react": "^3.0.0",
|
||||
"clsx": "^2.0.0",
|
||||
"prism-react-renderer": "^2.3.0",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@docusaurus/module-type-aliases": "^3.0.1",
|
||||
"@tsconfig/docusaurus": "^1.0.6",
|
||||
"typescript": "^4.9.4"
|
||||
"@docusaurus/module-type-aliases": "3.0.1",
|
||||
"@docusaurus/types": "3.0.1"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
@ -43,6 +37,11 @@
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
},
|
||||
"overrides": {
|
||||
"@cmfcmf/docusaurus-search-local": {
|
||||
"@docusaurus/core": "^3.0.0-rc.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
8495
docs/yarn.lock
8495
docs/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user