File tree 1 file changed +6
-9
lines changed
1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -38,15 +38,12 @@ const TRANSFORMERS = [
38
38
if ( pathsArgs . length > 0 ) {
39
39
if ( pathsArgs . some ( ( path ) => path . includes ( '*' ) ) ) {
40
40
try {
41
- // expand with globstar
42
41
paths = await glob ( pathsArgs , { ignore : 'node_modules/**' } )
43
42
} catch ( e ) {
44
43
console . log ( e )
45
44
process . exit ( 1 )
46
45
}
47
46
} else {
48
- // user provided multiple paths or a glob pattern expanded by its shell...
49
- // paths = pathsArgs.map(p => path.resolve(p))
50
47
paths = pathsArgs
51
48
}
52
49
}
@@ -58,12 +55,12 @@ const TRANSFORMERS = [
58
55
return value
59
56
}
60
57
61
- if ( printOptions ) options . printOptions = parsePrintOptions ( printOptions )
62
- if ( ! options . verbose && ! ( options . verbose === 0 ) ) options . verbose = 1
63
- // babel: apply babeljs to the transform file
64
- // yargs parser automatically parses "--no-<option>"" flags to `{ <option>: false }`
65
- if ( ! options . babel && options . babel !== false ) options . babel = true
66
- // other options can be left undefined and will be treated as if set to jscodeshift defaults
58
+ if ( printOptions ) {
59
+ options . printOptions = parsePrintOptions ( printOptions )
60
+ }
61
+ if ( ! options . babel && options . babel !== false ) {
62
+ options . babel = true
63
+ }
67
64
68
65
try {
69
66
await jscodeshift ( transformerPath , paths , options )
You can’t perform that action at this time.
0 commit comments