{"id":18951454,"url":"https://github.com/javascript-obfuscator/grunt-contrib-obfuscator","last_synced_at":"2025-04-15T17:31:28.243Z","repository":{"id":12550682,"uuid":"72040222","full_name":"javascript-obfuscator/grunt-contrib-obfuscator","owner":"javascript-obfuscator","description":"Grunt plugin for the javascript-obfuscator package.","archived":false,"fork":false,"pushed_at":"2023-06-29T22:44:49.000Z","size":385,"stargazers_count":27,"open_issues_count":18,"forks_count":21,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-04-24T16:09:39.124Z","etag":null,"topics":["grunt-contrib-obfuscator","grunt-plugins","javascript-obfuscator","obfuscator"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/javascript-obfuscator.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-10-26T20:07:29.000Z","updated_at":"2024-03-13T09:22:22.000Z","dependencies_parsed_at":"2024-01-23T21:28:47.724Z","dependency_job_id":"dd9cfdb0-efd7-405c-9cf7-33e06d6fdcdb","html_url":"https://github.com/javascript-obfuscator/grunt-contrib-obfuscator","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javascript-obfuscator%2Fgrunt-contrib-obfuscator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javascript-obfuscator%2Fgrunt-contrib-obfuscator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javascript-obfuscator%2Fgrunt-contrib-obfuscator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javascript-obfuscator%2Fgrunt-contrib-obfuscator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/javascript-obfuscator","download_url":"https://codeload.github.com/javascript-obfuscator/grunt-contrib-obfuscator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249118614,"owners_count":21215592,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["grunt-contrib-obfuscator","grunt-plugins","javascript-obfuscator","obfuscator"],"created_at":"2024-11-08T13:28:05.494Z","updated_at":"2025-04-15T17:31:28.211Z","avatar_url":"https://github.com/javascript-obfuscator.png","language":"JavaScript","readme":"# grunt-contrib-obfuscator [![Build Status](https://travis-ci.com/javascript-obfuscator/grunt-contrib-obfuscator.svg?branch=master)](https://travis-ci.com/javascript-obfuscator/grunt-contrib-obfuscator)\n\n\u003e Obfuscate JavaScript files using [javascript-obfuscator](https://github.com/javascript-obfuscator/javascript-obfuscator)@^2.0.0.\n\nYou can try the javascript-obfuscator module and see all its options here: https://obfuscator.io/\n\n## Getting Started\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\n\n```shell\nnpm install grunt-contrib-obfuscator --save-dev\nnpm install javascript-obfuscator --save-dev\n```\n\nNotice that you should install manually `javascript-obfuscator`. This makes it easier to have a newer version of the obfuscator library if needed.\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-contrib-obfuscator');\n```\n\n## Obfuscator task\n_Run this task with the `grunt obfuscator` command._\n\nTask targets, files and options may be specified according to the grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide.\n\n## Options\n\n[See the options on the obfuscator repo](https://github.com/javascript-obfuscator/javascript-obfuscator#javascript-obfuscator-options).\n\n_Note that at this time the `sourceMap` isn't implemented in this plugin._\n\nIn addition to the obfuscator options, you can also use:\n\n#### banner\nType: `String`\nDefault: `''`\n\nThis string will be prepended to the obfuscated output. Template strings (e.g. `\u003c%= config.value %\u003e` will be expanded automatically.\n\n## Usage examples\n\n#### Default options\n\nThis configuration will obfuscate the input files using the default options.\n\n```javascript\nobfuscator: {\n    options: {\n        // global options for the obfuscator\n    },\n    task1: {\n        options: {\n            // options for each sub task\n        },\n        files: {\n            'dest/output.js': [\n                'src/js/file1.js',\n                'src/js/file2.js'\n            ]\n        }\n    }\n}\n```\n\nThis configuration will obfuscate the input files in a destination folder by keeping the original names and directories\n\n```javascript\nobfuscator: {\n    options: {\n        // global options for the obfuscator\n    },\n    task1: {\n        options: {\n            // options for each sub task\n        },\n        files: {\n            'dest/': [ // the files and their directories will be created in this folder\n                'src/js/file1.js',\n                'src/js/folder/file2.js'\n            ]\n        }\n    }\n}\n```\n\n#### Debug protection and banner\n\nHere you code will be protected against debugging and locked to the domain `www.example.com`.\n\n```javascript\nobfuscator: {\n    options: {\n        banner: '// obfuscated with grunt-contrib-obfuscator.\\n',\n        debugProtection: true,\n        debugProtectionInterval: true,\n        domainLock: ['www.example.com']\n    },\n    task1: {\n        options: {\n            // options for each sub task\n        },\n        files: {\n            'dest/output.js': [\n                'src/js/file1.js',\n                'src/js/file2.js'\n            ]\n        }\n    }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavascript-obfuscator%2Fgrunt-contrib-obfuscator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjavascript-obfuscator%2Fgrunt-contrib-obfuscator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavascript-obfuscator%2Fgrunt-contrib-obfuscator/lists"}