Skip to content

Commit

Permalink
chore: clean up files (#1448)
Browse files Browse the repository at this point in the history
Co-authored-by: meteorlxy <[email protected]>
  • Loading branch information
Mister-Hope and meteorlxy authored Dec 6, 2023
1 parent 5575424 commit 0cf4a1e
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 150 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### Before submitting the PR, please make sure you do the following <!-- (put an "X" next to an item) -->

- [ ] Read the [Contributing Guidelines](https:/vuepress/vuepress-next/blob/main/docs/contributing.md).
- [ ] Read the [Contributing Guidelines](https:/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? <!-- (put an "X" next to an item) -->
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches:
- main
paths-ignore:
- 'docs/**'
- '**.md'
pull_request:
branches:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches:
- main
paths-ignore:
- 'docs/**'
- '**.md'
pull_request:
branches:
Expand Down
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# VuePress files
docs/.vuepress/.temp/
docs/.vuepress/.cache/
docs/.vuepress/dist/

# Dist files
dist/

Expand Down
32 changes: 0 additions & 32 deletions .vscode/launch.json

This file was deleted.

26 changes: 1 addition & 25 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
26 changes: 1 addition & 25 deletions CONTRIBUTING_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ pnpm install
pnpm build
```

开始开发项目文档网站:

```bash
pnpm docs:dev
```

本项目开发使用的一些主要工具:

- [TypeScript](https://www.typescriptlang.org/) 作为开发语言
Expand All @@ -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 来检查所有源文件。
Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 .",
Expand Down Expand Up @@ -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",
Expand Down
56 changes: 1 addition & 55 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
packages:
- docs
- packages/*

0 comments on commit 0cf4a1e

Please sign in to comment.