diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index d544c86efb..5a20c8887b 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -2,7 +2,7 @@ ### Before submitting the PR, please make sure you do the following -- [ ] Read the [Contributing Guidelines](https://github.com/vuepress/vuepress-next/blob/main/docs/contributing.md). +- [ ] Read the [Contributing Guidelines](https://github.com/vuepress/vuepress-next/blob/main/CONTRIBUTING.md). - [ ] Provide a description in this PR that addresses **what** the PR is solving. If this PR is going to solve an existing issue, please reference the issue (e.g. `close #123`). ### What is the purpose of this pull request? diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 5781d0e8ee..e72edbe0d3 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -5,7 +5,6 @@ on: branches: - main paths-ignore: - - 'docs/**' - '**.md' pull_request: branches: diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 6267862aa3..5d5f0e88c2 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -5,7 +5,6 @@ on: branches: - main paths-ignore: - - 'docs/**' - '**.md' pull_request: branches: diff --git a/.gitignore b/.gitignore index fb5da38d15..aef66cf5ba 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,3 @@ -# VuePress files -docs/.vuepress/.temp/ -docs/.vuepress/.cache/ -docs/.vuepress/dist/ - # Dist files dist/ diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 7edee640ff..0000000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "docs:dev", - "type": "node-terminal", - "request": "launch", - "command": "pnpm docs:dev" - }, - { - "name": "docs:build", - "type": "node-terminal", - "request": "launch", - "command": "pnpm docs:build" - }, - { - "name": "docs:dev (webpack)", - "type": "node-terminal", - "request": "launch", - "command": "DOCS_BUNDLER=webpack pnpm docs:dev" - }, - { - "name": "docs:build (webpack)", - "type": "node-terminal", - "request": "launch", - "command": "DOCS_BUNDLER=webpack pnpm docs:build" - } - ] -} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 381eac5cb8..aa91d931ba 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -40,12 +40,6 @@ Build source code: pnpm build ``` -Start developing the documentation site: - -```bash -pnpm docs:dev -``` - Main tools that used in this project: - [TypeScript](https://www.typescriptlang.org/) as the development language @@ -58,32 +52,14 @@ Main tools that used in this project: The `build` script uses `tsup` to compile TypeScript source files to JavaScript dist files. -Also, it will copy necessary resources from source directory to dist directory, because some source files (e.g. `.vue`, `.css` files) would not be processed by `tsup`, but should keep the same relative path in the dist directory. - You may need to run this script first after your clone this repository, because the dist files are ignored by `.gitignore`. ### `pnpm clean` -The `clean` script runs `clean` script in all packages, cleaning all the dist files and caches. In other words, it will remove all the files that generated by `build`, `copy` scripts. +The `clean` script runs `clean` script in all packages, cleaning all the dist files and caches. In other words, it will remove all the files that generated by `build` scripts. It's used before you want to re-build source files from a clean / initial state. -### `pnpm docs:*` - -#### `pnpm docs:build`, `pnpm docs:dev`, `pnpm docs:clean` - -The `docs:` prefix indicates that these scripts are for documentation, i.e. the `docs` directory. - -VuePress is using itself to build its own documentation site. - -You need to run `pnpm build` to build VuePress source files first, then run these `docs:` scripts to develop and build our documentation. - -#### `pnpm docs:serve` - -Serve the documentation site locally. - -You need to run `pnpm docs:build` first to generate the documentation dist files, and then run `pnpm docs:serve` to serve them. - ### `pnpm lint` The `lint` script uses ESLint to check all source files. diff --git a/CONTRIBUTING_zh.md b/CONTRIBUTING_zh.md index 407e8f7b43..2a79131a0b 100644 --- a/CONTRIBUTING_zh.md +++ b/CONTRIBUTING_zh.md @@ -40,12 +40,6 @@ pnpm install pnpm build ``` -开始开发项目文档网站: - -```bash -pnpm docs:dev -``` - 本项目开发使用的一些主要工具: - [TypeScript](https://www.typescriptlang.org/) 作为开发语言 @@ -58,32 +52,14 @@ pnpm docs:dev `build` 命令会使用 `tsup` 将 TypeScript 源文件编译为 JavaScript 文件。 -此外,它还会将必要的资源文件从源文件目录复制到输出目录。这是因为一些资源文件不会被 `tsup` 处理,但它们仍需要被放置到输出目录,并保持它们的项目对路径不变。 - 你在克隆代码仓库后,可能需要先执行该命令来确保项目代码可以顺利运行,因为编译后的输出目录被 `.gitignore` 排除在仓库以外了。 ### `pnpm clean` -`clean` 命令会执行所有子 Package 中的 `clean` 命令,清除所有的输出文件目录和缓存文件。换言之,它将移除所有通过 `build` 和 `copy` 命令生成的文件。 +`clean` 命令会执行所有子 Package 中的 `clean` 命令,清除所有的输出文件目录和缓存文件。换言之,它将移除所有通过 `build` 命令生成的文件。 当你想要从最初状态重新构建源代码时,你可以执行该命令。 -### `pnpm docs:*` - -#### `pnpm docs:build`, `pnpm docs:dev`, `pnpm docs:clean` - -`docs:` 前缀表明,这些命令是针对文档 (documentation) 进行操作的,即 `docs` 目录。 - -VuePress 使用它自己来构建自己的文档网站。 - -你需要先执行 `pnpm build` 来构建 VuePress 源代码,然后再运行这些 `docs:` 开头的命令来开发或构建文档。 - -#### `pnpm docs:serve` - -在本地启动文档网站服务器。 - -你需要先运行 `pnpm docs:build` 来生成文档网站的输出文件,然后再通过该命令来启动文档网站。 - ### `pnpm lint` `lint` 命令使用 ESLint 来检查所有源文件。 diff --git a/package.json b/package.json index 5cc5695617..d3e6881353 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,7 @@ "private": true, "type": "module", "scripts": { - "build": "pnpm build:all && pnpm build:copy", - "build:all": "pnpm -r --workspace-concurrency=1 --stream build", - "build:copy": "pnpm --parallel --stream copy", + "build": "pnpm -r --workspace-concurrency=1 --stream build", "clean": "pnpm --parallel --stream clean", "format": "prettier --write .", "lint": "eslint --ext .cjs,.js,.ts,.vue . && prettier --check .", @@ -34,7 +32,6 @@ "@vitest/coverage-istanbul": "1.0.0-beta.6", "bumpp": "^9.2.0", "conventional-changelog-cli": "^4.1.0", - "cpx2": "^6.0.1", "eslint": "^8.55.0", "eslint-config-vuepress": "^4.7.0", "eslint-config-vuepress-typescript": "^4.7.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c6e7029629..63ec086c1c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -29,9 +29,6 @@ importers: conventional-changelog-cli: specifier: ^4.1.0 version: 4.1.0 - cpx2: - specifier: ^6.0.1 - version: 6.0.1 eslint: specifier: ^8.55.0 version: 8.55.0 @@ -2760,28 +2757,6 @@ packages: path-type: 4.0.0 typescript: 5.3.2 - /cpx2@6.0.1: - resolution: {integrity: sha512-yzeVueRl+HtxHYmaDnnFdpXkAocqtPD9STTh61m4GpX4B6+oFB/ClsoJLXwjj9lguA0Ry2EpLvWIpRJ/x0bWbw==} - engines: {node: '>=16'} - hasBin: true - dependencies: - debounce: 1.2.1 - debug: 4.3.4 - duplexer: 0.1.2 - fs-extra: 11.2.0 - glob: 10.3.10 - glob2base: 0.0.12 - ignore: 5.3.0 - minimatch: 9.0.3 - p-map: 6.0.0 - resolve: 1.22.8 - safe-buffer: 5.2.1 - shell-quote: 1.8.1 - subarg: 1.0.0 - transitivePeerDependencies: - - supports-color - dev: true - /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -2856,10 +2831,6 @@ packages: engines: {node: '>=12'} dev: true - /debounce@1.2.1: - resolution: {integrity: sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==} - dev: true - /debug@2.6.9: resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} peerDependencies: @@ -3076,10 +3047,6 @@ packages: engines: {node: '>=12'} dev: true - /duplexer@0.1.2: - resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} - dev: true - /eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} @@ -3737,10 +3704,6 @@ packages: - supports-color dev: false - /find-index@0.1.1: - resolution: {integrity: sha512-uJ5vWrfBKMcE6y2Z8834dwEZj9mNGxYa3t3I53OwFeuZ8D9oc2E5zcsrkuhX6h4iYrjhiv0T3szQmxlAV9uxDg==} - dev: true - /find-up@4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} @@ -3986,13 +3949,6 @@ packages: resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} dev: false - /glob2base@0.0.12: - resolution: {integrity: sha512-ZyqlgowMbfj2NPjxaZZ/EtsXlOch28FRXgMd64vqZWk1bT9+wvSRLYD1om9M7QfQru51zJPAT17qXm4/zd+9QA==} - engines: {node: '>= 0.10'} - dependencies: - find-index: 0.1.1 - dev: true - /glob@10.3.10: resolution: {integrity: sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==} engines: {node: '>=16 || 14 >=14.17'} @@ -5550,11 +5506,6 @@ packages: p-limit: 4.0.0 dev: true - /p-map@6.0.0: - resolution: {integrity: sha512-T8BatKGY+k5rU+Q/GTYgrEf2r4xRMevAN5mtXc2aPc4rS1j3s+vWTaO2Wag94neXuCAUAs8cxBL9EeB5EA6diw==} - engines: {node: '>=16'} - dev: true - /p-retry@4.6.2: resolution: {integrity: sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==} engines: {node: '>=8'} @@ -6322,6 +6273,7 @@ packages: /shell-quote@1.8.1: resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} + dev: false /side-channel@1.0.4: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} @@ -6650,12 +6602,6 @@ packages: webpack: 5.89.0(esbuild@0.19.8) dev: false - /subarg@1.0.0: - resolution: {integrity: sha512-RIrIdRY0X1xojthNcVtgT9sjpOGagEUKpZdgBUi054OEPFo282yg+zE+t1Rj3+RqKq2xStL7uUHhY+AjbC4BXg==} - dependencies: - minimist: 1.2.8 - dev: true - /sucrase@3.34.0: resolution: {integrity: sha512-70/LQEZ07TEcxiU2dz51FKaE6hCTWC6vr7FOk3Gr0U60C3shtAN+H+BFr9XlYe5xqf3RA8nrc+VIwzCfnxuXJw==} engines: {node: '>=8'} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 196993a9ef..924b55f42e 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,3 +1,2 @@ packages: - - docs - packages/*