Revert "refactor: use yarn instead of pnpm (#23)"
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This reverts commit 191de2094d
.
This commit is contained in:
parent
191de2094d
commit
8fe289e270
@ -8,8 +8,9 @@ steps:
|
|||||||
image: node:18.16.0-bullseye
|
image: node:18.16.0-bullseye
|
||||||
commands:
|
commands:
|
||||||
# - git config --global --add safe.directory "/drone/src"
|
# - git config --global --add safe.directory "/drone/src"
|
||||||
- yarn install
|
- npm install -g pnpm
|
||||||
- yarn run build
|
- pnpm i --frozen-lockfile
|
||||||
|
- pnpm build
|
||||||
|
|
||||||
- name: publish
|
- name: publish
|
||||||
image: node:18.16.0-bullseye
|
image: node:18.16.0-bullseye
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -25,5 +25,5 @@ dist-ssr
|
|||||||
*.sw?
|
*.sw?
|
||||||
|
|
||||||
# Files created when running "drone exec" locally
|
# Files created when running "drone exec" locally
|
||||||
|
/.pnpm-store/
|
||||||
/*.zip
|
/*.zip
|
||||||
/.yarn
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
. "$(dirname -- "$0")/_/husky.sh"
|
. "$(dirname -- "$0")/_/husky.sh"
|
||||||
|
|
||||||
yarn exec lint-staged
|
pnpm exec lint-staged
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
. "$(dirname -- "$0")/_/husky.sh"
|
. "$(dirname -- "$0")/_/husky.sh"
|
||||||
|
|
||||||
yarn run test
|
pnpm test
|
||||||
|
3
.npmrc
Normal file
3
.npmrc
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
use-node-version=18.16.0
|
||||||
|
node-version=18.16.0
|
||||||
|
engine-strict=true
|
@ -1 +0,0 @@
|
|||||||
nodeLinker: node-modules
|
|
@ -18,8 +18,6 @@
|
|||||||
|
|
||||||
## 初次构建
|
## 初次构建
|
||||||
|
|
||||||
注意:libparakeet-js 目前是用的是 pnpm 包管理器。
|
|
||||||
|
|
||||||
- 进入上层目录:`cd ..`
|
- 进入上层目录:`cd ..`
|
||||||
- 克隆 `libparakeet-js` 仓库 (目前需要 Linux 环境, Windows 下推荐使用 WSL2)
|
- 克隆 `libparakeet-js` 仓库 (目前需要 Linux 环境, Windows 下推荐使用 WSL2)
|
||||||
- `git clone --recurse-submodules https://github.com/parakeet-rs/libparakeet-js.git`
|
- `git clone --recurse-submodules https://github.com/parakeet-rs/libparakeet-js.git`
|
||||||
@ -46,7 +44,7 @@
|
|||||||
将构建好的 SDK 直接嵌入到当前前端项目:
|
将构建好的 SDK 直接嵌入到当前前端项目:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
yarn link ../libparakeet-js/npm
|
pnpm link ../libparakeet-js/npm
|
||||||
```
|
```
|
||||||
|
|
||||||
※ 建立 PR 时,请先提交 SDK PR 并确保你的 SDK 更改已合并。
|
※ 建立 PR 时,请先提交 SDK PR 并确保你的 SDK 更改已合并。
|
||||||
|
@ -5,17 +5,17 @@
|
|||||||
## 安装依赖
|
## 安装依赖
|
||||||
|
|
||||||
- 安装 Node v16.17 或更高,推荐当前最新的 Node LTS 版本。
|
- 安装 Node v16.17 或更高,推荐当前最新的 Node LTS 版本。
|
||||||
- 安装/激活 `yarn` [^1]:`corepack enable && corepack prepare yarn@stable --activate`
|
- 安装/激活 `pnpm` [^1]:`corepack prepare pnpm@latest --activate`
|
||||||
- 安装软件依赖:`yarn install`
|
- 安装软件依赖:`pnpm i --frozen-lockfile`
|
||||||
|
|
||||||
[^1]: 参考 yarn 的安装说明「[Installation | Yarn - Package Manager](https://yarnpkg.com/getting-started/install)」。
|
[^1]: 参考 pnpm 说明「[使用 Corepack 安装](https://pnpm.io/zh/installation#使用-corepack-安装)」。
|
||||||
|
|
||||||
## 本地运行
|
## 本地运行
|
||||||
|
|
||||||
💡 你需要先完成「安装依赖」部分。
|
💡 你需要先完成「安装依赖」部分。
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
yarn start
|
pnpm start
|
||||||
```
|
```
|
||||||
|
|
||||||
然后根据提示打开[项目运行页面][vite-dev-url]即可。
|
然后根据提示打开[项目运行页面][vite-dev-url]即可。
|
||||||
@ -27,9 +27,9 @@ yarn start
|
|||||||
💡 你需要先完成「安装依赖」部分。
|
💡 你需要先完成「安装依赖」部分。
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
yarn build
|
pnpm build
|
||||||
```
|
```
|
||||||
|
|
||||||
如果需要预览构建版本,运行 `yarn preview` 然后打开[项目预览页面][vite-preview-url]即可。
|
如果需要预览构建版本,运行 `pnpm preview` 然后打开[项目预览页面][vite-preview-url]即可。
|
||||||
|
|
||||||
[vite-preview-url]: http://localhost:4173/
|
[vite-preview-url]: http://localhost:4173/
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "um-react",
|
"name": "um-react",
|
||||||
"packageManager": "yarn@3.6.0",
|
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
7665
pnpm-lock.yaml
Normal file
7665
pnpm-lock.yaml
Normal file
File diff suppressed because it is too large
Load Diff
@ -28,11 +28,15 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
server: {
|
server: {
|
||||||
fs: {
|
fs: {
|
||||||
|
// Note:
|
||||||
|
// This is _insecure_, but is required to get pnpm link to work.
|
||||||
|
// strict: false,
|
||||||
|
|
||||||
allow: [
|
allow: [
|
||||||
'src',
|
'src',
|
||||||
'node_modules',
|
'node_modules',
|
||||||
|
|
||||||
// Allow package manager to link (i.e. yarn).
|
// Allow pnpm to link.
|
||||||
process.env.LIB_PARAKEET_JS_DIR || '../libparakeet-js',
|
process.env.LIB_PARAKEET_JS_DIR || '../libparakeet-js',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user