1
0
mirror of https://github.com/142vip/408CSFamily.git synced 2026-04-14 02:09:56 +08:00

Merge pull request #113 from chufan443/feat/only-pnpm

feat: 引入`only-allow`严格校验`pnpm`使用
This commit is contained in:
微信公众号:储凡
2024-10-16 14:50:41 +08:00
committed by GitHub
3 changed files with 20 additions and 47 deletions

View File

@@ -38,10 +38,7 @@ features:
## 本地浏览【推荐】
由于平台、网络等原因,在线浏览容易出现加载面、加载不出来等常见问题,因此非常建议在本地进行浏览、学习;**下面指令默认你已经安装[Git](https://git-scm.com/download)、[NPM](https://www.npmjs.com/)、[PNPM](https://www.pnpm.cn/)、[Yarn](https://yarn.bootcss.com/)、[Node](http://nodejs.cn)等环境,并对此有一定了解!**
::: code-tabs#shell
@tab PNPM推荐
由于平台、网络等原因,在线浏览容易出现加载面、加载不出来等常见问题,因此非常建议在本地进行浏览、学习;**下面指令默认你已经安装[Git](https://git-scm.com/download)、[NPM](https://www.npmjs.com/)、[PNPM](https://www.pnpm.cn/)、[Node](http://nodejs.cn)等环境,并对此有一定了解!**
```bash:no-line-numbers
## 进入cmd命令行直接克隆仓库
@@ -61,48 +58,6 @@ pnpm dev
```
@tab NPM
```bash:no-line-numbers
## 进入cmd命令行直接克隆仓库
git clone https://github.com/mmdapl/408CSFamily.git
## 进入408CSFamily文件夹中
cd 408CSFamily
## tips: 如果本地已经clone过仓库建议执行pull指令获取最新
git pull
## 下载依赖包
npm install
## 执行dev指令本地启动项目打开http://localhost:4200即可访问文档
npm run dev
```
@tab YARN
```bash:no-line-numbers
## 进入cmd命令行直接克隆仓库
git clone https://github.com/mmdapl/408CSFamily.git
## 进入408CSFamily文件夹中
cd 408CSFamily
## tips: 如果本地已经clone过仓库建议执行pull指令获取最新
git pull
## 下载依赖包
yarn install
## 执行dev指令本地启动项目打开http://localhost:4200即可访问文档
yarn run dev
```
:::
查看项目启动日志并访问:[http://127.0.0.1:4200](http://localhost:4200),开启学习之旅吧~
## 在线浏览

View File

@@ -16,7 +16,7 @@
"pnpm": "9.6.0"
},
"scripts": {
"preinstall": "chmod +x ./scripts/*",
"preinstall": "npx only-allow pnpm && chmod +x ./scripts/*",
"postinstall": "pnpm build:mark-map",
"clean": "npx fa clean --ignore-tips --dist --vite --all",
"lint": "npx fa lint",
@@ -42,6 +42,7 @@
"hls.js": "^1.5.13",
"markmap-cli": "^0.15.8",
"mermaid": "^10.9.1",
"only-allow": "^1.2.1",
"reveal.js": "^5.1.0",
"sass-embedded": "^1.79.3",
"typescript": "^5.5.4",

17
pnpm-lock.yaml generated
View File

@@ -47,6 +47,9 @@ importers:
mermaid:
specifier: ^10.9.1
version: 10.9.2
only-allow:
specifier: ^1.2.1
version: 1.2.1
reveal.js:
specifier: ^5.1.0
version: 5.1.0
@@ -3808,6 +3811,10 @@ packages:
oniguruma-to-js@0.4.3:
resolution: {integrity: sha512-X0jWUcAlxORhOqqBREgPMgnshB7ZGYszBNspP+tS9hPD3l13CdaXcHbgImoHUHlrvGx/7AvFEkTRhAGYh+jzjQ==}
only-allow@1.2.1:
resolution: {integrity: sha512-M7CJbmv7UCopc0neRKdzfoGWaVZC+xC1925GitKH9EAqYFzX9//25Q7oX4+jw0tiCCj+t5l6VZh8UPH23NZkMA==}
hasBin: true
open@10.1.0:
resolution: {integrity: sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==}
engines: {node: '>=18'}
@@ -5219,6 +5226,10 @@ packages:
which-module@2.0.1:
resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==}
which-pm-runs@1.1.0:
resolution: {integrity: sha512-n1brCuqClxfFfq/Rb0ICg9giSZqCS+pLtccdag6C2HyufBrh3fBOiy9nb6ggRMvWOVH5GrdJskj5iGTZNxd7SA==}
engines: {node: '>=4'}
which@2.0.2:
resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==}
engines: {node: '>= 8'}
@@ -9639,6 +9650,10 @@ snapshots:
dependencies:
regex: 4.3.3
only-allow@1.2.1:
dependencies:
which-pm-runs: 1.1.0
open@10.1.0:
dependencies:
default-browser: 5.2.1
@@ -10972,6 +10987,8 @@ snapshots:
which-module@2.0.1: {}
which-pm-runs@1.1.0: {}
which@2.0.2:
dependencies:
isexe: 2.0.0