Added ability to specify the path to the input file after specifying the obfuscator options

Fixed https://github.com/javascript-obfuscator/javascript-obfuscator/issues/904
This commit is contained in:
sanex
2021-04-07 19:37:26 +03:00
parent 2d120ab21c
commit 0926c13029
7 changed files with 59 additions and 25 deletions
+1 -1
View File
@@ -137,12 +137,12 @@ export class JavaScriptObfuscatorCLI implements IInitializable {
}
public initialize (): void {
this.inputPath = path.normalize(this.arguments[0] || '');
this.commands = <commander.CommanderStatic>(new commander.Command());
this.configureCommands();
this.configureHelp();
this.inputPath = path.normalize(this.commands.args[0] || '');
this.inputCLIOptions = JavaScriptObfuscatorCLI.buildOptions(this.commands.opts());
this.sourceCodeReader = new SourceCodeReader(
this.inputPath,