Skip to content

Commit 3f210e8

Browse files
committed
feat: use vue-macros cli
1 parent ab948c2 commit 3f210e8

File tree

4 files changed

+48
-3
lines changed

4 files changed

+48
-3
lines changed

.github/workflows/release.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch: {}
8+
9+
jobs:
10+
release:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
id-token: write
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Install pnpm
22+
uses: pnpm/action-setup@v2
23+
24+
- name: Set node
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: lts/*
28+
cache: pnpm
29+
registry-url: 'https://registry.npmjs.org'
30+
31+
- run: npx changelogithub
32+
continue-on-error: true
33+
env:
34+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
35+
36+
- name: Install Dependencies
37+
run: pnpm i
38+
39+
- name: Publish to NPM
40+
run: pnpm -r publish --access public --no-git-checks
41+
env:
42+
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}}
43+
NPM_CONFIG_PROVENANCE: true

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pnpm add -g @vue-macros/cli
2121

2222
### sg
2323
```shell
24-
@vue-macros/cli sg
24+
vue-macros sg
2525
```
2626

2727
## License

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
"main": "./dist/index.mjs",
2828
"module": "./dist/index.mjs",
2929
"types": "./dist/index.d.ts",
30-
"bin": "./dist/index.mjs",
30+
"bin": {
31+
"vue-macros": "./dist/index.mjs"
32+
},
3133
"files": [
3234
"dist"
3335
],

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ if (macro === 'short-v-model') {
5353
})
5454
}
5555

56-
const target = path.resolve(argv._.at(-1) || '.')
56+
const target = path.resolve(argv._.at(1) || './src')
5757
async function toSetupSFC() {
5858
const filename = path.basename(target)
5959
const files = await glob(`${target}${filename ? '' : '/**/*.vue'}`, {

0 commit comments

Comments
 (0)