Skip to content

Commit 12efcc2

Browse files
committed
工具: add ci
1 parent a2111e5 commit 12efcc2

File tree

6 files changed

+369
-55
lines changed

6 files changed

+369
-55
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: GitHub Actions Build and Deploy pages
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
build-and-deploy:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@master
12+
13+
- name: Build doc and Deploy
14+
uses: JamesIves/github-pages-deploy-action@master
15+
env:
16+
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
17+
BRANCH: gh-pages
18+
FOLDER: .vitepress/dist
19+
BUILD_SCRIPT: yarn install && yarn run docs:build

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Hello VitePress

example/main.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class App extends VueComponent {
2121
<ConfigProvider locale={zhCN}>
2222
<h2 style={{ textAlign: 'center' }}>全局服务</h2>
2323
<RouterView></RouterView>
24-
<Table></Table>
2524
</ConfigProvider>
2625
)
2726
}

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
</head>
88
<body>
99
<div id="app"></div>
10-
<script type="module" src="./example/main.tsx"></script>
10+
<script type="module" src="/example/main.tsx"></script>
1111
</body>
1212
</html>

package.json

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@
1919
"lint": "eslint --fix .",
2020
"format": "prettier --write '**/*.{ts,tsx,js,vue,css,scss,html,json}'",
2121
"chrome": "open -n /Applications/Google\\ Chrome.app/ --args --disable-web-security --user-data-dir=$HOME/MyChromeDevUserData/",
22-
"prepare": "install-peers",
2322
"release": "standard-version",
24-
"prepublishOnly": "yarn run-s build release"
23+
"prepublishOnly": "yarn run-s build release",
24+
"docs:dev": "vitepress dev docs",
25+
"docs:build": "vitepress build docs",
26+
"docs:serve": "vitepress serve docs"
2527
},
2628
"files": [
2729
"dist",
@@ -45,7 +47,7 @@
4547
"type": "git",
4648
"url": "git+https://github.com/agileago/vue3-oop.git"
4749
},
48-
"homepage": "https://github.com/agileago/vue3-oop#readme",
50+
"homepage": "https://agileago.github.io/vue3-oop",
4951
"license": "MIT",
5052
"devDependencies": {
5153
"@abraham/reflection": "^0.8.0",
@@ -63,7 +65,6 @@
6365
"eslint": "^7.32.0",
6466
"eslint-config-prettier": "^8.3.0",
6567
"eslint-plugin-prettier": "^3.4.1",
66-
"install-peers-cli": "^2.2.0",
6768
"lint-staged": "^11.1.2",
6869
"npm-run-all": "^4.1.5",
6970
"prettier": "^2.3.2",
@@ -72,7 +73,7 @@
7273
"typescript": "^4.3.5",
7374
"vite": "^2.5.0",
7475
"vite-plugin-ts": "^1.1.8",
75-
"vxe-table": "^4.1.5",
76+
"vitepress": "^0.20.1",
7677
"yorkie": "^2.0.0"
7778
},
7879
"config": {
@@ -93,16 +94,14 @@
9394
"prettier --write"
9495
]
9596
},
96-
"peerDependencies": {
97-
"injection-js": "^2.4.0",
98-
"vue": "^3.2.20",
99-
"vue-router": "^4.0.12"
100-
},
10197
"publishConfig": {
10298
"registry": "https://registry.npmjs.org",
10399
"access": "public"
104100
},
105101
"dependencies": {
106-
"autobind-decorator": "^2.4.0"
102+
"autobind-decorator": "^2.4.0",
103+
"injection-js": "^2.4.0",
104+
"vue": "^3.2.20",
105+
"vue-router": "^4.0.12"
107106
}
108107
}

0 commit comments

Comments
 (0)