Skip to content

Commit

Permalink
ci: yarn -> pnpm, node 12 -> 14
Browse files Browse the repository at this point in the history
  • Loading branch information
pengxiaotian authored Dec 29, 2021
2 parents 7812a76 + d48e824 commit 456e0bc
Show file tree
Hide file tree
Showing 20 changed files with 7,929 additions and 7,964 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/develop-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,30 @@ on:
jobs:
develop-ci:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14]

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Step Node.js 12
- name: Step pnpm
uses: pnpm/[email protected]
with:
version: latest

- name: Step Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: '12'
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install dependencies
run: yarn bootstrap
run: pnpm run bootstrap

- name: Build Website
run: yarn build
run: pnpm run build

- name: Deploy
uses: JamesIves/[email protected]
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/feat-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Feat CI

on:
push:
paths-ignore:
- '**.md'
- 'demo/**'

jobs:
feat-ci:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14]

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Step pnpm
uses: pnpm/[email protected]
with:
version: latest

- name: Step Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install dependencies
run: pnpm run bootstrap

- name: Build Website
run: pnpm run build
17 changes: 13 additions & 4 deletions .github/workflows/main-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,30 @@ on:
jobs:
main-deploy:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14]

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Step Node.js 12
- name: Step pnpm
uses: pnpm/[email protected]
with:
version: latest

- name: Step Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: '12'
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install dependencies
run: yarn bootstrap
run: pnpm run bootstrap

- name: Build Website
run: yarn build
run: pnpm run build

- name: Deploy
uses: JamesIves/[email protected]
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
.pnpm-debug.log*

# Editor directories and files
.idea
Expand Down
4 changes: 1 addition & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

echo '$ commit-msg'
echo '$ yarn commitlint -e $1'
yarn run commitlint -e $1
npx --no-install commitlint --edit $1
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn run lint-staged
pnpm exec lint-staged
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,22 +111,22 @@

```bash
# 初始化项目
yarn bootstrap
pnpm run bootstrap

# 跑起来!
yarn dev
pnpm run dev

# 构建发布
yarn build
pnpm run build

# 本地预览,需要先执行 build
yarn serve
pnpm run serve
```

### 新建可视化组件

```bash
yarn new datav
pnpm run new datav
```

### 配置可视化组件
Expand Down Expand Up @@ -180,20 +180,20 @@ main-title
- 快速创建一个组件

```bash
yarn gc [component name]
pnpm run gc [component name]
```

- 通过选项模式

```bash
# 创建组件
yarn new component
pnpm run new component

# 创建 Store
yarn new store
pnpm run new store

# 创建 Icon
yarn new icons
pnpm run new icons
```

## 国际化
Expand Down
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"scripts": {
"gc": "bash ./scripts/gc.sh",
"new": "plop --plopfile ./plop-templates/plopfile.js",
"bootstrap": "yarn --frozen-lockfile",
"bootstrap": "pnpm install --frozen-lockfile",
"dev": "cross-env NODE_ENV=development vite",
"build": "NODE_ENV=production vue-tsc --noEmit && vite build",
"build:fast": "NODE_ENV=production vite build",
"serve": "vite preview",
"lint": "yarn lint:type && yarn lint:code && yarn lint:css",
"lint": "pnpm run lint:type && pnpm run lint:code && pnpm run lint:css",
"lint:type": "vue-tsc --noEmit",
"lint:code": "eslint --fix 'src/**/*.{js,ts,vue}'",
"lint:css": "stylelint --fix 'src/**/*.(css|scss|vue)'",
Expand All @@ -19,14 +19,15 @@
},
"dependencies": {
"@monaco-editor/loader": "^1.2.0",
"@vue/shared": "^3.2.26",
"accounting": "^0.4.1",
"axios": "^0.21.1",
"axios-mock-adapter": "^1.19.0",
"crypto-js": "^4.0.0",
"dayjs": "^1.10.7",
"echarts": "^5.2.2",
"echarts-wordcloud": "^2.0.0",
"element-plus": "1.0.2-beta.55",
"element-plus": "^1.2.0-beta.6",
"gsap": "^3.7.1",
"html2canvas": "^1.3.3",
"js-cookie": "^3.0.1",
Expand Down Expand Up @@ -77,15 +78,15 @@
"stylelint": "^14.1.0",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-standard": "^24.0.0",
"tslib": "^2.3.1",
"typescript": "^4.5.4",
"vite": "2.7.1",
"unplugin-element-plus": "^0.1.3",
"vite": "^2.7.9",
"vite-plugin-plain-text": "^1.1.4",
"vue-tsc": "^0.29.8"
},
"lint-staged": {
"src/**/*.{js,ts,vue}": [
"eslint --fix"
]
"src/**/*.{js,ts,vue}": "eslint --fix"
},
"repository": {
"type": "git",
Expand Down
Loading

0 comments on commit 456e0bc

Please sign in to comment.