Skip to content

Commit

Permalink
fix: excluding files in node_modules and gitignore (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Wang authored Jul 30, 2021
1 parent cb897f3 commit a89dd8d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bin/vue-codemod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const {
let logger: Console = console
if (formatter === 'log') {
let options = {
flags: 'w',
flags: 'w',
encoding: 'utf8' // utf-8
}
let stdout = fs.createWriteStream('./vue_codemod.log', options)
Expand Down Expand Up @@ -119,7 +119,10 @@ async function main() {
cliProgress.Presets.shades_classic
)

const resolvedPaths = globby.sync(files as string[])
const resolvedPaths = globby.sync(
(files as string[]).concat('!node_modules'),
{ gitignore: true }
)
if (transformationName != undefined) {
debug(`run ${transformationName} transformation`)
const transformationModule = loadTransformationModule(transformationName)
Expand Down

0 comments on commit a89dd8d

Please sign in to comment.