Skip to content

Commit a89dd8d

Browse files
author
Alan Wang
authored
fix: excluding files in node_modules and gitignore (#100)
1 parent cb897f3 commit a89dd8d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

bin/vue-codemod.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const {
7373
let logger: Console = console
7474
if (formatter === 'log') {
7575
let options = {
76-
flags: 'w',
76+
flags: 'w',
7777
encoding: 'utf8' // utf-8
7878
}
7979
let stdout = fs.createWriteStream('./vue_codemod.log', options)
@@ -119,7 +119,10 @@ async function main() {
119119
cliProgress.Presets.shades_classic
120120
)
121121

122-
const resolvedPaths = globby.sync(files as string[])
122+
const resolvedPaths = globby.sync(
123+
(files as string[]).concat('!node_modules'),
124+
{ gitignore: true }
125+
)
123126
if (transformationName != undefined) {
124127
debug(`run ${transformationName} transformation`)
125128
const transformationModule = loadTransformationModule(transformationName)

0 commit comments

Comments
 (0)