Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bytehide/grunt-shield

Package Overview
Dependencies
Maintainers
0
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bytehide/grunt-shield

Grunt plugin for ByteHide Shield code obfuscation

  • 1.0.8
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

@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! 🛡️

Keywords

FAQs

Package last updated on 25 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc