|
1 |
| -## Escodegen |
2 |
| -[](http://badge.fury.io/js/escodegen) |
3 |
| -[](http://travis-ci.org/estools/escodegen) |
4 |
| -[](https://david-dm.org/estools/escodegen) |
5 |
| -[](https://david-dm.org/estools/escodegen#info=devDependencies) |
| 1 | +## `escodegen` fork for `javascript-obfuscator` package |
6 | 2 |
|
7 |
| -Escodegen ([escodegen](http://github.com/estools/escodegen)) is an |
8 |
| -[ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) |
9 |
| -(also popularly known as [JavaScript](http://en.wikipedia.org/wiki/JavaScript)) |
10 |
| -code generator from [Mozilla's Parser API](https://developer.mozilla.org/en/SpiderMonkey/Parser_API) |
11 |
| -AST. See the [online generator](https://estools.github.io/escodegen/demo/index.html) |
12 |
| -for a demo. |
13 |
| - |
14 |
| - |
15 |
| -### Install |
16 |
| - |
17 |
| -Escodegen can be used in a web browser: |
18 |
| - |
19 |
| - <script src="escodegen.browser.js"></script> |
20 |
| - |
21 |
| -escodegen.browser.js can be found in tagged revisions on GitHub. |
22 |
| - |
23 |
| -Or in a Node.js application via npm: |
24 |
| - |
25 |
| - npm install escodegen |
26 |
| - |
27 |
| -### Usage |
28 |
| - |
29 |
| -A simple example: the program |
30 |
| - |
31 |
| - escodegen.generate({ |
32 |
| - type: 'BinaryExpression', |
33 |
| - operator: '+', |
34 |
| - left: { type: 'Literal', value: 40 }, |
35 |
| - right: { type: 'Literal', value: 2 } |
36 |
| - }); |
37 |
| - |
38 |
| -produces the string `'40 + 2'`. |
39 |
| - |
40 |
| -See the [API page](https://github.com/estools/escodegen/wiki/API) for |
41 |
| -options. To run the tests, execute `npm test` in the root directory. |
42 |
| - |
43 |
| -### Building browser bundle / minified browser bundle |
44 |
| - |
45 |
| -At first, execute `npm install` to install the all dev dependencies. |
46 |
| -After that, |
47 |
| - |
48 |
| - npm run-script build |
49 |
| - |
50 |
| -will generate `escodegen.browser.js`, which can be used in browser environments. |
51 |
| - |
52 |
| -And, |
53 |
| - |
54 |
| - npm run-script build-min |
55 |
| - |
56 |
| -will generate the minified file `escodegen.browser.min.js`. |
| 3 | +See: https://github.com/javascript-obfuscator/javascript-obfuscator/issues/795 |
57 | 4 |
|
58 | 5 | ### License
|
59 | 6 |
|
|
0 commit comments