Skip to content

Commit

Permalink
Fix for bug that caused arguments not to be passed.
Browse files Browse the repository at this point in the history
  • Loading branch information
ElonVolo committed Jan 23, 2021
1 parent 13f91f6 commit 82d04e1
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions bin/logitall.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,23 @@ if (commander.args.length === 0) {
let parentDir = require('path').resolve(__dirname, '..');
let jsc = path.join(parentDir, 'node_modules', 'jscodeshift', 'bin', 'jscodeshift.js');
let transformPath = path.join(parentDir, 'transform.js');
let args = [jsc, '-t', transformPath, '--extensions=ts', '--parser=ts', commander.args[0], '--verbose=2'];
let args = [jsc, '-t', transformPath, '--extensions=ts,js', '--parser=ts', commander.args[0], '--verbose=2'];

if (commander.ignoreConfig) {
args.push(`--ignore-config=${commander.ignoreConfig}`);
let passedOptions = commander.opts();

if (passedOptions.ignoreConfig) {
args.push(`--ignore-config=${passedOptions.ignoreConfig}`);
}

if (commander.namedFunctionsOnly) {
if (passedOptions.namedFunctionsOnly) {
args.push('--named-functions-only');
}

if (commander.rxjs) {
if (passedOptions.rxjs) {
args.push('--rxjs');
}

if (commander.params) {
if (passedOptions.params) {
args.push('--params');
}

Expand Down

0 comments on commit 82d04e1

Please sign in to comment.