1 | #javascript-obfuscator plugin for Webpack
|
2 |
|
3 | [![npm version](https://badge.fury.io/js/webpack-obfuscator.svg)](https://badge.fury.io/js/webpack-obfuscator)
|
4 |
|
5 | ### Installation
|
6 |
|
7 | Install the package with NPM and add it to your devDependencies:
|
8 |
|
9 | `npm install --save-dev webpack-obfuscator`
|
10 |
|
11 | ### Usage:
|
12 |
|
13 | ```javascript
|
14 | var WebpackObfuscator = require('webpack-obfuscator');
|
15 |
|
16 | // ...
|
17 |
|
18 | // webpack plugins array
|
19 | plugins: [
|
20 | new WebpackObfuscator({
|
21 | rotateUnicodeArray: true
|
22 | }, ['excluded_bundle_name.js'])
|
23 | ],
|
24 | ```
|
25 |
|
26 | ### obfuscatorOptions
|
27 | Type: `Object` Default: `null`
|
28 |
|
29 | Options for [javascript-obfuscator](https://github.com/sanex3339/javascript-obfuscator). Should be passed exactly like described on their page.
|
30 |
|
31 | ### excludes
|
32 | Type: `Array` or `String` Default: `[]`
|
33 |
|
34 | Examples: `['excluded_bundle_name.js', '**_bundle_name.js']` or `'excluded_bundle_name.js'`
|
35 |
|
36 | Can be used to bypass obfuscation of some files.
|
37 |
|
38 | ### License
|
39 | Copyright (C) 2016 [Timofey Kachalov](http://github.com/sanex3339).
|
40 |
|
41 | Redistribution and use in source and binary forms, with or without
|
42 | modification, are permitted provided that the following conditions are met:
|
43 |
|
44 | * Redistributions of source code must retain the above copyright
|
45 | notice, this list of conditions and the following disclaimer.
|
46 | * Redistributions in binary form must reproduce the above copyright
|
47 | notice, this list of conditions and the following disclaimer in the
|
48 | documentation and/or other materials provided with the distribution.
|
49 |
|
50 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
51 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
52 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
53 | ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
54 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
55 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
56 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
57 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
58 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
59 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
\ | No newline at end of file |