mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
CLI: Added directory obfuscation
This commit is contained in:
@@ -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 */`;
|
||||
|
||||
Reference in New Issue
Block a user