Skip to content

Commit

Permalink
feat: sidebar新增工具链
Browse files Browse the repository at this point in the history
  • Loading branch information
ccweng committed Oct 9, 2024
1 parent b53d6c4 commit 9d00113
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export default defineConfig({
{ text: 'JS 事件循环机制', link: '/frontend/event-loop' },
{ text: '工程化: JS 包管理器', link: '/frontend/pkg-manager' },
{ text: '工程化: Monorepo', link: '/frontend/monorepo' },
{ text: '工程化: 构建工具链', link: '/frontend/toolchain' },
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/frontend/monorepo.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Monorepo 最佳实践
# 工程化:Monorepo 最佳实践

> 大仓究竟是什么东西?
Expand Down
32 changes: 31 additions & 1 deletion docs/frontend/pkg-manager.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# 工程化之 JS 包管理器
# 工程化:JS 包管理器

> 你真的懂 `node_module``package.json`
:::info 信息
🚧 施工中
:::

## 1. 包管理器

在工程化环境下,开发同学可能已经接触到一些编程语言的**包管理器**了,比如:

- python:pip
- java:maven、gradle
- golang:go mod
- rust:cargo
- dart:dart pub

直白的讲,包管理器就是一种软件工具,可以以一致的方式自动管理(包括安装、升级、配置、删除)项目所需要的**第三方依赖**

回到前端开发工程化的语境,JavaScript 的包管理器就是:

- npm
- yarn
- pnpm

甚至还有更多,但本文只聚焦这三种包管理器。

为了方便展开和理解,在最开始让我们忘掉 `yarn``pnpm`,直接来看看 `npm` 到底解决了哪些问题。

## 2. npm

## 3. yarn

## 4. pnpm
1 change: 1 addition & 0 deletions docs/frontend/toolchain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# 工程化:构建工具链

0 comments on commit 9d00113

Please sign in to comment.