CLI: Added directory obfuscation

This commit is contained in:
sanex3339
2017-10-10 21:38:38 +03:00
parent 2a171ae9a0
commit 905132d3e3
15 changed files with 450 additions and 386 deletions
+14 -2
View File
@@ -182,10 +182,13 @@ Method takes two parameters, `sourceCode` and `options` – the source code and
For available options see [options](#options).
## CLI usage
#### Obfuscate single file
Usage:
```sh
javascript-obfuscator in.js [options]
javascript-obfuscator in.js --output out.js [options]
javascript-obfuscator input_file_name.js [options]
javascript-obfuscator input_file_name.js --output output_file_name.js [options]
```
If the destination path is not specified with the `--output` option, obfuscated code will saved into the input file directory with name like `INPUT_FILE_NAME-obfuscated.js`
@@ -201,6 +204,15 @@ javascript-obfuscator samples/sample.js --output output/output.js --compact true
See [CLI options](#cli-options).
#### Obfuscate directory
Usage:
```sh
javascript-obfuscator input_directory_name [options]
```
Obfuscated code always will saved into the input directory under `INPUT_FILE_NAME-obfuscated.js` name.
## Conditional comments
You can disable and enable obfuscation for specific parts of the code by adding following comments:
* disable: `// javascript-obfuscator:disable` or `/* javascript-obfuscator:disable */`;