Skip to content

Commit 9e2f822

Browse files
committed
master: Fixed 优化npm包
1 parent a74bbec commit 9e2f822

25 files changed

+5582
-6672
lines changed

.eslintrc.cjs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@ require('@rushstack/eslint-patch/modern-module-resolution')
33

44
module.exports = {
55
root: true,
6-
'extends': [
6+
parser: 'vue-eslint-parser',
7+
parserOptions: {
8+
parser: '@typescript-eslint/parser',
9+
sourceType: 'module'
10+
},
11+
extends: [
712
'plugin:vue/vue3-essential',
13+
'plugin:@typescript-eslint/recommended',
814
'eslint:recommended',
915
'@vue/eslint-config-prettier/skip-formatting'
1016
],
11-
parserOptions: {
12-
ecmaVersion: 'latest'
13-
}
17+
plugins: ['@typescript-eslint'],
1418
}

.github/workflows/deploy.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# 工作流的名称,如果省略,则使用当前文件名
2+
name: Auto Deploy
3+
4+
# 从工作流生成的工作流运行的名称,如果省略,则使用提交时的commit信息
5+
run-name: Deploy by @${{ github.actor }}
6+
7+
# 触发部署的条件
8+
on:
9+
# 每当 push 到 master 分支时触发部署
10+
push:
11+
branches:
12+
- master
13+
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
# 当前流程要执行的任务,可以是多个。[my_first_job]就是一个任务
20+
jobs:
21+
build:
22+
name: build-and-deploy
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: pnpm/action-setup@v2
28+
with:
29+
version: 6.32.9
30+
- uses: actions/setup-node@v4
31+
with:
32+
node-version: '20'
33+
cache: 'pnpm'
34+
35+
- name: install
36+
run: pnpm install
37+
38+
- name: Run Build Script
39+
run: pnpm build
40+
41+
- name: Upload artifact
42+
uses: actions/upload-pages-artifact@v3
43+
with:
44+
path: ./dist
45+
# Deployment job
46+
deploy:
47+
environment:
48+
name: github-pages
49+
url: ${{ steps.deployment.outputs.page_url }}
50+
runs-on: ubuntu-latest
51+
needs: build
52+
steps:
53+
- name: Deploy to GitHub Pages
54+
id: deployment
55+
uses: actions/deploy-pages@v4

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
</head>
99
<body>
1010
<div id="app"></div>
11-
<script type="module" src="/src/main.js"></script>
11+
<script type="module" src="/src/main.ts"></script>
1212
</body>
1313
</html>

lib/vue3-time-line.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
declare interface IOptions {
2+
comName?: string;
3+
}
4+
5+
declare interface ITimeLine {
6+
install(app: any, options?: IOptions): void;
7+
}
8+
9+
declare const Vue3TimeLine: ITimeLine;
10+
export default Vue3TimeLine;
11+
12+
export { }

0 commit comments

Comments
 (0)