Skip to content

Commit

Permalink
chore: 补充脚本
Browse files Browse the repository at this point in the history
  • Loading branch information
sdmu-gaoqi committed Jan 12, 2024
1 parent afe96fc commit 58350de
Show file tree
Hide file tree
Showing 8 changed files with 101 additions and 10 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Publish Package to npmjs

on:
push:
branches: [dev]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
always-auth: true
node-version: 16
cache: 'yarn'
- run: sh scripts/build.sh dev
17 changes: 17 additions & 0 deletions .github/workflows/pre.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Publish Package to npmjs

on:
push:
branches: [pre-develop]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
always-auth: true
node-version: 16
cache: 'yarn'
- run: sh scripts/build.sh pre
17 changes: 17 additions & 0 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Publish Package to npmjs

on:
push:
branches: [main, master, release, develop]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
always-auth: true
node-version: 16
cache: 'yarn'
- run: sh scripts/build.sh
17 changes: 17 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Publish Package to npmjs

on:
push:
branches: [test-develop]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
always-auth: true
node-version: 16
cache: 'yarn'
- run: sh scripts/build.sh test
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"echarts": "^5.4.3",
"eslint-plugin-import": "^2.25.2",
"path": "^0.12.7",
"postcss": "^8.0.0",
"prettier": "^3.0.0",
"sass": "^1.64.1",
"smooth-scrollbar": "^8.8.4",
Expand Down
17 changes: 17 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh
set -e
ENV=$1

__build() {
echo "安装依赖"
yarn
echo "开始打包"
yarn build:$ENV
echo "打包完成"
}

__main() {
__build
}

__main
7 changes: 6 additions & 1 deletion src/components/layout/layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@
</div>
</a-layout-header>
<a-layout>
<a-layout-sider width="200" style="background: #fff" collapsible>
<a-layout-sider
width="200"
style="background: #fff"
collapsible
collapsedWidth="40"
>
<!-- 菜单栏区域 -->
<a-menu mode="inline" :style="{ height: '100%', borderRight: 0 }">
<template v-for="item in currentMenus" :key="item.key">
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4339,6 +4339,15 @@ postcss-value-parser@^4.0.0, postcss-value-parser@^4.2.0:
resolved "https://registry.npmmirror.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514"
integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==

postcss@^8.0.0, postcss@^8.4.32:
version "8.4.33"
resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz#1378e859c9f69bf6f638b990a0212f43e2aaa742"
integrity sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==
dependencies:
nanoid "^3.3.7"
picocolors "^1.0.0"
source-map-js "^1.0.2"

postcss@^8.1.10, postcss@^8.4.23, postcss@^8.4.27:
version "8.4.28"
resolved "https://registry.npmmirror.com/postcss/-/postcss-8.4.28.tgz#c6cc681ed00109072816e1557f889ef51cf950a5"
Expand All @@ -4348,15 +4357,6 @@ postcss@^8.1.10, postcss@^8.4.23, postcss@^8.4.27:
picocolors "^1.0.0"
source-map-js "^1.0.2"

postcss@^8.4.32:
version "8.4.33"
resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz#1378e859c9f69bf6f638b990a0212f43e2aaa742"
integrity sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==
dependencies:
nanoid "^3.3.7"
picocolors "^1.0.0"
source-map-js "^1.0.2"

prelude-ls@^1.2.1:
version "1.2.1"
resolved "https://registry.npmmirror.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
Expand Down

0 comments on commit 58350de

Please sign in to comment.