0.0.4 • Published 7 years ago

js-obfuscator-api v0.0.4

Weekly downloads
10
License
MIT
Repository
github
Last release
7 years ago

JS Obfuscator Grunt Task

Obfuscate your JS code using the formal (paid) HTTP API of http://www.javascriptobfuscator.com.

You need a Premium Membership Subscription in order to use this package.

Usage

Install using NPM:

$ npm i -D js-obfuscator-api

Gruntfile.js:

module.exports = function (grunt) {
    require('js-obfuscator-api')(grunt);

    grunt.initConfig({

        obfuscate: {
            dist: {
                src: 'dist/bundle.js',
                dest: 'dist/bundle.js',
                obfuscateOptions: {
                    APIKey: process.env.OBFUSCATOR_API_KEY,
                    APIPwd: process.env.OBFUSCATOR_API_PWD,
                    VariableExclusion: '^_get_ ^_set_ ^_mtd_',
                    EncodeStrings: true,
                    MoveStrings: true,
                    ReplaceNames: true,
                    WriteFormats_KeepIndent: false
                }
            }
        }
        
    });

    grunt.registerTask('deploy', ['obfuscate:dist']);
};

Check out the default options and read more about obfuscation options at: https://service.javascriptobfuscator.com/httpapi.asmx?WSDL.

API key and password:

It is NOT recommended to put these hard coded in Gruntfile.js. You should pass them as environment variables using process.env.

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago