Skip to content

Commit d614bc8

Browse files
committed
feat: allow file
1 parent 21485f3 commit d614bc8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/index.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ let macro = await select({
2626
{ value: 'short-v-model' },
2727
{ value: 'define-slots' },
2828
],
29-
},
30-
)
29+
})
3130

3231
let render
3332
if (macro === 'jsx-directive') {
@@ -56,8 +55,8 @@ if (macro === 'short-v-model') {
5655
}
5756

5857
const targetDirectory = path.resolve(argv._.at(-1) || '.')
59-
60-
const files = await glob(`${targetDirectory}/**/*.vue`, {
58+
const filename = path.basename(targetDirectory)
59+
const files = await glob(`${targetDirectory}${filename ? '' : '/**/*.vue'}`, {
6160
ignore: [
6261
'**/node_modules/**',
6362
argv.ignore,

0 commit comments

Comments
 (0)