Skip to content

Commit 0003cf4

Browse files
committed
chore(ci): use deploy
1 parent 7456e49 commit 0003cf4

File tree

3 files changed

+338
-77
lines changed

3 files changed

+338
-77
lines changed

.github/workflows/npm-publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,32 @@ jobs:
2424
- run: pnpm release
2525
env:
2626
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
27+
28+
deploy:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v3
32+
with:
33+
fetch-depth: 0
34+
- name: Set node
35+
uses: actions/setup-node@v3
36+
with:
37+
registry-url: https://registry.npmjs.org/
38+
node-version: 16.x
39+
40+
- name: Setup
41+
run: npm i -g pnpm
42+
43+
- name: Install
44+
run: pnpm install --no-frozen-lockfile
45+
46+
- name: Build
47+
run: cd playground && pnpm build
48+
49+
- name: Deploy 🚀
50+
uses: JamesIves/github-pages-deploy-action@v4.3.3
51+
with:
52+
branch: gh-pages
53+
folder: playground/dist
54+
ACCESS_TOKEN: ${{secrets.GITHUB_TOKEN}}
55+

package.json

Lines changed: 79 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,79 @@
1-
{
2-
"name": "vue3-script-to-setup",
3-
"type": "module",
4-
"version": "0.1.5",
5-
"author": "clencat <2091927351@qq.com>",
6-
"packageManager": "pnpm@7.12.0",
7-
"description": "transform your vue3 script to setup mode",
8-
"license": "MIT",
9-
"repository": {
10-
"type": "git",
11-
"url": "git+https://github.com/a145789/vue3-script-to-setup"
12-
},
13-
"bugs": "https://github.com/a145789/vue3-script-to-setup/issues",
14-
"keywords": [
15-
"vue3"
16-
],
17-
"sideEffects": false,
18-
"files": [
19-
"dist"
20-
],
21-
"exports": {
22-
".": {
23-
"types": "./dist/index.d.ts",
24-
"import": "./dist/index.mjs"
25-
}
26-
},
27-
"main": "./dist/index.mjs",
28-
"module": "./dist/index.mjs",
29-
"types": "./dist/index.d.ts",
30-
"bin": {
31-
"tosetup": "bin/tosetup.mjs"
32-
},
33-
"typesVersions": {
34-
"*": {
35-
"*": [
36-
"./dist/*",
37-
"./dist/index.d.ts"
38-
]
39-
}
40-
},
41-
"engines": {
42-
"node": ">=14"
43-
},
44-
"scripts": {
45-
"build": "unbuild",
46-
"lint": "rome ci ./src",
47-
"prepublishOnly": "nr build",
48-
"dev": "esno src/setup.ts",
49-
"test": "vitest",
50-
"typecheck": "tsc --noEmit",
51-
"major": "standard-version -r major",
52-
"minor": "standard-version -r minor",
53-
"patch": "standard-version -r patch",
54-
"release": "pnpm run build && pnpm publish --access public --no-git-checks"
55-
},
56-
"devDependencies": {
57-
"@antfu/ni": "^0.20.0",
58-
"@types/node": "^18.14.2",
59-
"esno": "^0.16.3",
60-
"rome": "^11.0.0",
61-
"standard-version": "^9.5.0",
62-
"typescript": "^4.9.5",
63-
"vite": "^4.1.4",
64-
"vitest": "^0.29.2",
65-
"unbuild": "^1.1.2"
66-
},
67-
"dependencies": {
68-
"@swc/core": "^1.3.37",
69-
"colorette": "^2.0.19",
70-
"fast-glob": "^3.2.12",
71-
"find-up": "^6.3.0",
72-
"magic-string": "^0.30.0",
73-
"slash": "^5.0.0",
74-
"unconfig": "^0.3.7",
75-
"vue": "^3.2.47"
76-
}
77-
}
1+
{
2+
"name": "vue3-script-to-setup",
3+
"type": "module",
4+
"version": "0.1.5",
5+
"author": "clencat <2091927351@qq.com>",
6+
"packageManager": "pnpm@7.12.0",
7+
"description": "transform your vue3 script to setup mode",
8+
"license": "MIT",
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/a145789/vue3-script-to-setup"
12+
},
13+
"bugs": "https://github.com/a145789/vue3-script-to-setup/issues",
14+
"keywords": [
15+
"vue3"
16+
],
17+
"sideEffects": false,
18+
"files": [
19+
"dist"
20+
],
21+
"exports": {
22+
".": {
23+
"types": "./dist/index.d.ts",
24+
"import": "./dist/index.mjs"
25+
}
26+
},
27+
"main": "./dist/index.mjs",
28+
"module": "./dist/index.mjs",
29+
"types": "./dist/index.d.ts",
30+
"bin": {
31+
"tosetup": "bin/tosetup.mjs"
32+
},
33+
"typesVersions": {
34+
"*": {
35+
"*": [
36+
"./dist/*",
37+
"./dist/index.d.ts"
38+
]
39+
}
40+
},
41+
"engines": {
42+
"node": ">=14"
43+
},
44+
"scripts": {
45+
"build": "unbuild",
46+
"lint": "rome ci ./src",
47+
"prepublishOnly": "nr build",
48+
"dev": "esno src/setup.ts",
49+
"test": "vitest",
50+
"typecheck": "tsc --noEmit",
51+
"major": "standard-version -r major",
52+
"minor": "standard-version -r minor",
53+
"patch": "standard-version -r patch",
54+
"release": "pnpm run build && pnpm publish --access public --no-git-checks",
55+
"deploy": "cd playground && pnpm build && gh-pages -d playground/dist"
56+
},
57+
"devDependencies": {
58+
"@antfu/ni": "^0.20.0",
59+
"@types/node": "^18.14.2",
60+
"esno": "^0.16.3",
61+
"gh-pages": "^5.0.0",
62+
"rome": "^11.0.0",
63+
"standard-version": "^9.5.0",
64+
"typescript": "^4.9.5",
65+
"unbuild": "^1.1.2",
66+
"vite": "^4.1.4",
67+
"vitest": "^0.29.2"
68+
},
69+
"dependencies": {
70+
"@swc/core": "^1.3.37",
71+
"colorette": "^2.0.19",
72+
"fast-glob": "^3.2.12",
73+
"find-up": "^6.3.0",
74+
"magic-string": "^0.30.0",
75+
"slash": "^5.0.0",
76+
"unconfig": "^0.3.7",
77+
"vue": "^3.2.47"
78+
}
79+
}

0 commit comments

Comments
 (0)