"exclude" member of config file does not work as expected. #593
Copy link
Copy link
Closed
Labels
Description
Note: I've been searching for the official documentation on the config file syntax and have not found it, perhaps I'm using it wrong. Can you please point me to the config file documentation?
Expected Behavior
Using "exclude" in the config should work the same as if provided on the command line.
Current Behavior
The "exclude" member of the config file is ignored.
Steps to Reproduce
$ mkdir -pv a/{b,c}
$ for f in a{,/b,/c}/{d,e,f}.js;do echo "console.log('this is $f');" > $f;done
$ javascript-obfuscator a --exclude a/b
[javascript-obfuscator-cli] Obfuscating file: a/c/d.js...
[javascript-obfuscator-cli] Obfuscating file: a/c/e.js...
[javascript-obfuscator-cli] Obfuscating file: a/c/f.js...
[javascript-obfuscator-cli] Obfuscating file: a/d.js...
[javascript-obfuscator-cli] Obfuscating file: a/e.js...
[javascript-obfuscator-cli] Obfuscating file: a/f.js...
$ echo 'module.exports = {exclude:["a/b"]};' > cfg.js
$ javascript-obfuscator a --config cfg.js
[javascript-obfuscator-cli] Obfuscating file: a/b/d.js...
[javascript-obfuscator-cli] Obfuscating file: a/b/e.js...
[javascript-obfuscator-cli] Obfuscating file: a/b/f.js...
[javascript-obfuscator-cli] Obfuscating file: a/c/d.js...
[javascript-obfuscator-cli] Obfuscating file: a/c/e.js...
[javascript-obfuscator-cli] Obfuscating file: a/c/f.js...
[javascript-obfuscator-cli] Obfuscating file: a/d.js...
[javascript-obfuscator-cli] Obfuscating file: a/e.js...
[javascript-obfuscator-cli] Obfuscating file: a/f.js...
Your Environment
OS: Fedora 31
$ node --version
v12.16.1
$ javascript-obfuscator --version
0.27.2_2020-03-16T08:53:54.447Z
Stack trace
N/A
Minimal working example that will help to reproduce issue
see above.
Reactions are currently unavailable
Activity
Fixed #593
sanex3339 commentedon Apr 10, 2020
Fix #594
sanex3339 commentedon Apr 10, 2020
Expect a release tomorrow
sanex3339 commentedon Apr 11, 2020
Released as
0.27.3