Skip to content

Commit

Permalink
docs: update guide for project bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorlxy committed Mar 18, 2020
1 parent 3551e69 commit f7a78b4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ yarn test
# Clean dependencies.
yarn clean

# Useful when creating new submodules.
# Useful when creating new a package.
yarn boot
```

Expand Down
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ ports:
- port: 8080
onOpen: open-preview
tasks:
- init: yarn bootstrap
- init: yarn
command: yarn dev
6 changes: 2 additions & 4 deletions packages/docs/docs/miscellaneous/local-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ VuePress is using a combo with [Yarn workspaces](https://yarnpkg.com/lang/en/doc
## Init packages

```bash
yarn bootstrap // it will run and install into the root all packages subfolders
yarn // it will install dependencies of all packages
```

`yarn bootstrap` will use hoisting. What does it mean for you ?
`yarn` will use hoisting. What does it mean for you ?

It will regroup all dependencies in the workspace root and link all packages.

Expand All @@ -26,8 +26,6 @@ Check the link by running the following command:
ls -la node_modules/@vuepress
```

You will all symlinks

:::warning
You have to take care to declare all dependencies inside subFolders package.json. When publish the lib if dependencies from a package is not declare it will just not work.
:::
Expand Down
6 changes: 2 additions & 4 deletions packages/docs/docs/zh/miscellaneous/local-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ VuePress 正在使用包含了 [Yarn Workspaces](https://yarnpkg.com/zh-Hans/doc
## 初始化 package

```bash
yarn bootstrap // 它将运行并安装根目录和所有 package 的依赖
yarn // 它将安装所有 package 的依赖
```

`yarn bootstrap` 将使用 `hoist`。它对你意味着什么?
`yarn` 将使用 `hoist`。它对你意味着什么?

它将重组工作空间根目录中的所有依赖项并链接所有 package。

Expand All @@ -26,8 +26,6 @@ VuePress 正在使用包含了 [Yarn Workspaces](https://yarnpkg.com/zh-Hans/doc
ls -la node_modules/@vuepress
```

你将全部链接完成。

::: warning
你必须注意应在子文件夹的 package.json 中声明所有依赖项。如果未声明 package 的 dependencies,则在发布到 npm 时将无法正常工作。
:::
Expand Down
2 changes: 1 addition & 1 deletion packages/vuepress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The docs are available at <https://vuepress.vuejs.org>
Want to contribute? Check our [issues for beginners](https://github.com/vuejs/vuepress/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)!

```bash
yarn bootstrap # Install and link dependencies for this lerna repo
yarn # Install and link dependencies for this monorepo
yarn dev # serves VuePress' own docs with itself
yarn test # make sure your code change pass the test
```
Expand Down

0 comments on commit f7a78b4

Please sign in to comment.