mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Added more tests for directory compilation and fixed some logic.
This commit is contained in:
@@ -24,6 +24,23 @@ import { JavaScriptObfuscator } from '../JavaScriptObfuscatorFacade';
|
||||
import { SourceCodeReader } from './utils/SourceCodeReader';
|
||||
|
||||
export class JavaScriptObfuscatorCLI implements IInitializable {
|
||||
/**
|
||||
* @type {string[]}
|
||||
*/
|
||||
public static readonly availableInputExtensions: string[] = [
|
||||
'.js'
|
||||
];
|
||||
|
||||
/**
|
||||
* @type {BufferEncoding}
|
||||
*/
|
||||
public static readonly encoding: BufferEncoding = 'utf8';
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
public static obfuscatedFilePrefix: string = '-obfuscated';
|
||||
|
||||
/**
|
||||
* @type {string[]}
|
||||
*/
|
||||
@@ -295,8 +312,9 @@ export class JavaScriptObfuscatorCLI implements IInitializable {
|
||||
private configureHelp (): void {
|
||||
this.commands.on('--help', () => {
|
||||
console.log(' Examples:\n');
|
||||
console.log(' %> javascript-obfuscator in.js --compact true --selfDefending false');
|
||||
console.log(' %> javascript-obfuscator in.js --output out.js --compact true --selfDefending false');
|
||||
console.log(' %> javascript-obfuscator input_file_name.js --compact true --selfDefending false');
|
||||
console.log(' %> javascript-obfuscator input_file_name.js --output output_file_name.js --compact true --selfDefending false');
|
||||
console.log(' %> javascript-obfuscator input_directory_name --compact true --selfDefending false');
|
||||
console.log('');
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user