You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Grunt plugin for [javascript-obfuscator](https://github.com/javascript-obfuscator/javascript-obfuscator). You can try the javascript-obfuscator module and see all its options here: https://javascriptobfuscator.herokuapp.com
3
+
> Obfuscate JavaScript files using [javascript-obfuscator](https://github.com/javascript-obfuscator/javascript-obfuscator)
You can try the javascript-obfuscator module and see all its options here: https://javascriptobfuscator.herokuapp.com
7
6
8
-
## Installation
7
+
## Getting Started
9
8
10
-
Install the package with NPM:
9
+
If 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:
11
10
12
-
`npm install --save grunt-contrib-obfuscator`
11
+
```shell
12
+
npm install grunt-contrib-obfuscator --save-dev
13
+
```
14
+
15
+
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
16
+
17
+
```js
18
+
grunt.loadNpmTasks('grunt-contrib-obfuscator');
19
+
```
20
+
21
+
## Obfuscator task
22
+
_Run this task with the `grunt obfuscator` command._
23
+
24
+
Task targets, files and options may be specified according to the grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide.
25
+
26
+
## Options
27
+
28
+
[See the options on the obfuscator repo](https://github.com/javascript-obfuscator/javascript-obfuscator#javascript-obfuscator-options).
29
+
30
+
_Note that at this time the `sourceMap` isn't implemented in this plugin._
31
+
32
+
In addition the the obfuscator options, you can also use:
33
+
34
+
#### banner
35
+
Type: `String`
36
+
Default: `''`
37
+
38
+
This string will be prepended to the obfuscated output. Template strings (e.g. `<%= config.value %>` will be expanded automatically.
13
39
14
-
## Usage
40
+
## Usage examples
41
+
42
+
#### Default options
43
+
44
+
This configuration will obfuscate the input files using the default options.
15
45
16
46
```javascript
17
47
obfuscator: {
@@ -32,8 +62,27 @@ obfuscator: {
32
62
}
33
63
```
34
64
35
-
##Options
65
+
#### Debug protection and banner
36
66
37
-
[See the options on the obfuscator repo](https://github.com/javascript-obfuscator/javascript-obfuscator#javascript-obfuscator-options).
67
+
Here you code will be protected against debugging
38
68
39
-
Note that at this time the `sourceMap` isn't implemented in this plugin.
69
+
```javascript
70
+
obfuscator: {
71
+
options: {
72
+
banner:'// obfuscated with grunt-contrib-obfuscator.\n',
0 commit comments