diff --git a/.github/workflows/v2-build-blog-only.yml b/.github/workflows/v2-build-blog-only.yml index e11b9bf9f9..0ef3569e27 100644 --- a/.github/workflows/v2-build-blog-only.yml +++ b/.github/workflows/v2-build-blog-only.yml @@ -20,4 +20,4 @@ jobs: with: install-command: yarn - name: Build blog-only - run: yarn workspace docusaurus-2-website build:blogOnly + run: yarn workspace website build:blogOnly diff --git a/.github/workflows/v2-build-size-report.yml b/.github/workflows/v2-build-size-report.yml index 73b43004d8..f81e754c6b 100644 --- a/.github/workflows/v2-build-size-report.yml +++ b/.github/workflows/v2-build-size-report.yml @@ -24,7 +24,7 @@ jobs: - uses: preactjs/compressed-size-action@v2 with: repo-token: '${{ secrets.GITHUB_TOKEN }}' - build-script: 'build:v2:en' + build-script: 'build:website:en' pattern: '{website/build/assets/js/main*js,website/build/assets/css/styles*css,website/.docusaurus/globalData.json,website/build/index.html,website/build/blog/index.html,website/build/blog/**/introducing-docusaurus/*,website/build/docs/index.html,website/build/docs/installation/index.html,website/build/tests/docs/index.html,website/build/tests/docs/standalone/index.html}' strip-hash: '\.([^;]\w{7})\.' minimum-change-threshold: 30 diff --git a/.github/workflows/v2-build-time-perf.yml b/.github/workflows/v2-build-time-perf.yml index b10bbbea74..79e0854669 100644 --- a/.github/workflows/v2-build-time-perf.yml +++ b/.github/workflows/v2-build-time-perf.yml @@ -24,11 +24,11 @@ jobs: # Ensure build with a cold cache does not increase too much - name: Build (cold cache) - run: yarn workspace docusaurus-2-website build --locale en + run: yarn workspace website build --locale en timeout-minutes: 8 # Ensure build with a warm cache does not increase too much - name: Build (warm cache) - run: yarn workspace docusaurus-2-website build --locale en + run: yarn workspace website build --locale en timeout-minutes: 2 # TODO post a Github comment with build with perf warnings? diff --git a/.github/workflows/v2-tests-e2e.yml b/.github/workflows/v2-tests-e2e.yml index 5e0c9e0ca6..43ca2d425e 100644 --- a/.github/workflows/v2-tests-e2e.yml +++ b/.github/workflows/v2-tests-e2e.yml @@ -31,7 +31,7 @@ jobs: install-command: yarn - name: Generate test-website project against main branch run: | - KEEP_CONTAINER=true yarn test:build:v2 -s + KEEP_CONTAINER=true yarn test:build:website -s mv test-website ../test-website - name: Install test-website project with Yarn v1 run: | @@ -68,7 +68,7 @@ jobs: - name: Generate test-website project against main branch run: | - KEEP_CONTAINER=true yarn test:build:v2 -s + KEEP_CONTAINER=true yarn test:build:website -s mv test-website ../test-website - name: Install test-website project with Yarn Berry and nodeLinker = ${{ matrix.nodeLinker }} run: | diff --git a/.github/workflows/v2-tests-windows.yml b/.github/workflows/v2-tests-windows.yml index a393eeac2a..42e2587c0e 100644 --- a/.github/workflows/v2-tests-windows.yml +++ b/.github/workflows/v2-tests-windows.yml @@ -29,6 +29,6 @@ jobs: - name: Docusaurus Jest Tests run: yarn test - name: Docusaurus Build - run: yarn build:v2 --locale en + run: yarn build:website --locale en env: CI: true diff --git a/admin/publish.md b/admin/publish.md index 93cbb99428..f2d38547cf 100644 --- a/admin/publish.md +++ b/admin/publish.md @@ -57,7 +57,7 @@ yarn install ```sh # This will build all the packages and publish them in a local Verdaccio npm registry # and then initialize a new website in the `test-website` directory using those locally published packages -yarn test:build:v2 +yarn test:build:website # Now you can test the site in dev/prod mode cd test-website @@ -103,7 +103,7 @@ yarn changelog --from v2.0.0-beta.0 ### 4. Cut a new version of the docs ```sh -yarn workspace docusaurus-2-website docusaurus docs:version 2.0.0-beta.0 +yarn workspace website docusaurus docs:version 2.0.0-beta.0 ``` Test running the website with the new version locally. diff --git a/package.json b/package.json index 3bef72f2d3..c6d8dab064 100644 --- a/package.json +++ b/package.json @@ -7,30 +7,30 @@ "admin/new.docusaurus.io" ], "scripts": { - "start": "yarn build:packages && yarn start:v2", - "start:v2": "yarn workspace docusaurus-2-website start", - "start:v2:watch": "nodemon --watch \"./packages/*/lib/**/*.*\" --exec \"yarn start:v2\"", - "start:v2:baseUrl": "yarn workspace docusaurus-2-website start:baseUrl", - "start:v2:bootstrap": "yarn workspace docusaurus-2-website start:bootstrap", - "start:v2:blogOnly": "yarn workspace docusaurus-2-website start:blogOnly", - "start:v2:deployPreview": "cross-env NETLIFY=true CONTEXT='deploy-preview' yarn workspace docusaurus-2-website start", + "start": "yarn build:packages && yarn start:website", + "start:website": "yarn workspace website start", + "start:website:watch": "nodemon --watch \"./packages/*/lib/**/*.*\" --exec \"yarn start:website\"", + "start:website:baseUrl": "yarn workspace website start:baseUrl", + "start:website:bootstrap": "yarn workspace website start:bootstrap", + "start:website:blogOnly": "yarn workspace website start:blogOnly", + "start:website:deployPreview": "cross-env NETLIFY=true CONTEXT='deploy-preview' yarn workspace website start", "examples:generate": "node generateExamples", - "build": "yarn build:packages && yarn build:v2", + "build": "yarn build:packages && yarn build:website", "build:packages": "lerna run build --no-private", - "build:v2": "yarn workspace docusaurus-2-website build", - "build:v2:baseUrl": "yarn workspace docusaurus-2-website build:baseUrl", - "build:v2:blogOnly": "yarn workspace docusaurus-2-website build:blogOnly", - "build:v2:deployPreview": "cross-env NETLIFY=true CONTEXT='deploy-preview' yarn workspace docusaurus-2-website build", - "build:v2:en": "yarn workspace docusaurus-2-website build --locale en", - "clear:v2": "yarn workspace docusaurus-2-website clear", - "serve:v2": "yarn workspace docusaurus-2-website serve", - "serve:v2:baseUrl": "serve website", - "serve:v2:ssl": "yarn serve:v2:ssl:gencert && yarn serve:v2:ssl:message && yarn serve:v2:ssl:serve", - "serve:v2:ssl:gencert": "openssl req -x509 -nodes -days 365 -newkey rsa:4096 -subj \"/C=US/ST=Docusaurus/L=Anywhere/O=Dis/CN=localhost\" -keyout ./website/.docusaurus/selfsigned.key -out ./website/.docusaurus/selfsigned.crt", - "serve:v2:ssl:message": "echo '\n\n\nServing Docusaurus with HTTPS on localhost requires to disable the Chrome security: chrome://flags/#allow-insecure-localhost\n\n\n'", - "serve:v2:ssl:serve": "serve website/build --ssl-cert ./website/.docusaurus/selfsigned.crt --ssl-key ./website/.docusaurus/selfsigned.key", - "crowdin:upload:v2": "crowdin upload sources --config ./crowdin-v2.yaml", - "crowdin:download:v2": "crowdin download --config ./crowdin-v2.yaml", + "build:website": "yarn workspace website build", + "build:website:baseUrl": "yarn workspace website build:baseUrl", + "build:website:blogOnly": "yarn workspace website build:blogOnly", + "build:website:deployPreview": "cross-env NETLIFY=true CONTEXT='deploy-preview' yarn workspace website build", + "build:website:en": "yarn workspace website build --locale en", + "clear:website": "yarn workspace website clear", + "serve:website": "yarn workspace website serve", + "serve:website:baseUrl": "serve website", + "serve:website:ssl": "yarn serve:website:ssl:gencert && yarn serve:website:ssl:message && yarn serve:website:ssl:serve", + "serve:website:ssl:gencert": "openssl req -x509 -nodes -days 365 -newkey rsa:4096 -subj \"/C=US/ST=Docusaurus/L=Anywhere/O=Dis/CN=localhost\" -keyout ./website/.docusaurus/selfsigned.key -out ./website/.docusaurus/selfsigned.crt", + "serve:website:ssl:message": "echo '\n\n\nServing Docusaurus with HTTPS on localhost requires to disable the Chrome security: chrome://flags/#allow-insecure-localhost\n\n\n'", + "serve:website:ssl:serve": "serve website/build --ssl-cert ./website/.docusaurus/selfsigned.crt --ssl-key ./website/.docusaurus/selfsigned.key", + "crowdin:upload:website": "crowdin upload sources --config ./crowdin-v2.yaml", + "crowdin:download:website": "crowdin download --config ./crowdin-v2.yaml", "canary": "yarn canary:bumpVersion && yarn canary:publish", "canary:version": "echo 0.0.0-`git rev-list --count HEAD`+`git rev-parse --short HEAD`", "canary:bumpVersion": "yarn lerna version `yarn --silent canary:version` --exact --no-push --yes", @@ -49,10 +49,10 @@ "lint:style": "stylelint \"**/*.css\"", "lerna": "lerna", "test": "cross-env TZ=UTC jest", - "test:build:v2": "./admin/scripts/test-release.sh", + "test:build:website": "./admin/scripts/test-release.sh", "watch": "yarn lerna run --parallel --no-private watch", - "clear": "(yarn workspace docusaurus-2-website clear || echo 'Failure while running docusaurus clear') && yarn lerna exec --ignore docusaurus yarn rimraf lib lib-next", - "test:baseUrl": "yarn build:v2:baseUrl && yarn serve:v2:baseUrl", + "clear": "(yarn workspace website clear || echo 'Failure while running docusaurus clear') && yarn lerna exec --ignore docusaurus yarn rimraf lib lib-next", + "test:baseUrl": "yarn build:website:baseUrl && yarn serve:website:baseUrl", "lock:update": "npx yarn-deduplicate" }, "devDependencies": { diff --git a/website/package.json b/website/package.json index d0fb6147f9..990c1a3f05 100644 --- a/website/package.json +++ b/website/package.json @@ -1,5 +1,5 @@ { - "name": "docusaurus-2-website", + "name": "website", "version": "2.0.0-beta.4", "private": true, "scripts": { @@ -22,9 +22,9 @@ "netlify:build:deployPreview": "yarn docusaurus write-translations --locale fr --messagePrefix '(fr) ' && yarn build", "netlify:crowdin:delay": "node delayCrowdin.js", "netlify:crowdin:wait": "node waitForCrowdin.js", - "netlify:crowdin:downloadTranslations": "yarn netlify:crowdin:wait && yarn --cwd .. crowdin:download:v2", - "netlify:crowdin:downloadTranslationsFailSafe": "yarn netlify:crowdin:wait && (yarn --cwd .. crowdin:download:v2 || echo 'Crowdin translation download failure (only internal PRs have access to the Crowdin env token)')", - "netlify:crowdin:uploadSources": "yarn --cwd .. crowdin:upload:v2", + "netlify:crowdin:downloadTranslations": "yarn netlify:crowdin:wait && yarn --cwd .. crowdin:download:website", + "netlify:crowdin:downloadTranslationsFailSafe": "yarn netlify:crowdin:wait && (yarn --cwd .. crowdin:download:website || echo 'Crowdin translation download failure (only internal PRs have access to the Crowdin env token)')", + "netlify:crowdin:uploadSources": "yarn --cwd .. crowdin:upload:website", "netlify:test": "yarn netlify:build:deployPreview && yarn netlify dev --debug" }, "dependencies": {