Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade: 清理和升级依赖 #396

Merged
merged 26 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,18 +347,14 @@ npm config delete https-proxy

#### 1)安装 `nodejs`

推荐安装 nodejs `16.x.x` 的版本,其他版本未做测试
推荐安装 nodejs `22.x.x` 的版本,其他版本未做测试

#### 2)安装 `lerna`
#### 2)安装 `pnpm`

运行如下命令即可安装所需依赖:

> 注:lerna指定为6.x版本,更高版本会导致打包失败(不兼容导致)

```shell
npm install -g cnpm --registry=https://registry.npmmirror.com

cnpm install -g lerna@6
npm install -g pnpm --registry=https://registry.npmmirror.com

```

Expand All @@ -372,11 +368,8 @@ git clone https://github.com/docmirror/dev-sidecar

cd dev-sidecar

# 注意不要使用 `npm install` 来安装依赖,因为 `lerna bootstrap` 会自动安装依赖
lerna bootstrap
# 如果 `lerna bootstrap` 有报错,可以尝试执行如下两行命令,用yarn替换掉npm:
#cnpm install -g yarn
#lerna bootstrap --npm-client=yarn
# 注意不要使用 `npm install` 来安装依赖,因为 `pnpm` 会自动安装依赖
pnpm install

# 运行DevSidecar
cd packages/gui
Expand Down
28 changes: 28 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import antfu from '@antfu/eslint-config'

export default antfu(
{
vue: {
vueVersion: 2,
},
rules: {
'style/brace-style': ['error', '1tbs'],
'style/space-before-function-paren': ['error', 'always'],
'import/newline-after-import': 'off',
'import/first': 'off',
'perfectionist/sort-imports': 'off',
'node/prefer-global/buffer': 'off',
'node/prefer-global/process': 'off',
'no-console': 'off',
},
ignores: [
'**/build/*',
'**/dist_electron',
],
formatters: {
css: true,
html: true,
markdown: 'prettier',
},
},
)
12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
{
"name": "dev-sidecar-parent",
"type": "module",
"private": false,
"packageManager": "[email protected]",
"author": "Greper",
"license": "MPL-2.0"
"license": "MPL-2.0",
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
"devDependencies": {
"@antfu/eslint-config": "^3.9.1",
"eslint": "^9.15.0",
"eslint-plugin-format": "^0.1.2"
}
}
Loading
Loading