1.1.0 • Published 11 months ago

@bytehide/grunt-shield v1.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

@bytehide/grunt-shield

A Grunt plugin for protecting JavaScript files using ByteHide Shield obfuscation.

Installation

npm install @bytehide/grunt-shield --save-dev

Configuration

Add this to your Gruntfile.js:

module.exports = function (grunt) {
  grunt.initConfig({
    bytehideShield: {
      options: {
        projectToken: 'your-bytehide-token',  // or use process.env.BYTEHIDE_TOKEN
        distDir: 'dist',                      // Directory containing files to protect
        replace: false,                       // Replace original files or create new ones
        obfuscatedExtension: '.obf',          // Extension for protected files
        exclude: [],                          // Files to exclude from protection
        config: {
          controlFlowFlattening: true,
          debugProtection: false,
          devtoolsBlocking: false,
        }
      },
      dist: {}
    }
  });

  grunt.loadNpmTasks('@bytehide/grunt-shield');
};                                                                                                                                                                                                                                                                                               

Usage

Run the task:

grunt bytehideShield

Options

  • projectToken: Your ByteHide project token (required)
  • distDir: Directory containing files to protect (default: 'dist')
  • replace: Whether to replace original files (default: false)
  • obfuscatedExtension: Extension for protected files (default: '.obf')
  • exclude: Array of filenames to exclude from protection
  • config: ByteHide Shield configuration options
    • controlFlowFlattening: Enable control flow flattening
    • debugProtection: Enable debug protection
    • devtoolsBlocking: Enable devtools blocking

MIT


Happy coding but keep it safe with @bytehide/grunt-shield! 🛡️

1.1.0

11 months ago

1.0.9

11 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago