Skip to content

Commit 9f45869

Browse files
committed
Merge branch 'dev'
# Conflicts: # index.ts
2 parents 1911828 + 7f239ad commit 9f45869

File tree

9 files changed

+2636
-5
lines changed

9 files changed

+2636
-5
lines changed

index.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
"use strict";
22

3-
declare let module: any;
4-
declare let require: any;
5-
6-
import * as JavaScriptObfuscator from 'javascript-obfuscator';
3+
import { JavaScriptObfuscator } from 'javascript-obfuscator';
74

85
let multimatch: any = require('multimatch'),
96
RawSource: any = require('webpack-core/lib/RawSource');

tsconfig.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,9 @@
77
"experimentalDecorators": true,
88
"removeComments": true,
99
"noImplicitAny": false
10-
}
10+
},
11+
"exclude": [
12+
"typings/browser",
13+
"typings/browser.d.ts"
14+
]
1115
}

typings.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "webpack-obfuscator",
3+
"version": false,
4+
"ambientDependencies": {
5+
"node": "github:DefinitelyTyped/DefinitelyTyped/node/node.d.ts#6834f97fb33561a3ad40695084da2b660efaee29",
6+
"javascript-obfuscator": "github:DefinitelyTyped/DefinitelyTyped/javascript-obfuscator/javascript-obfuscator.d.ts"
7+
}
8+
}

typings/browser.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/// <reference path="browser/ambient/javascript-obfuscator/index.d.ts" />
2+
/// <reference path="browser/ambient/node/index.d.ts" />
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Generated by typings
2+
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/master/javascript-obfuscator/javascript-obfuscator.d.ts
3+
// Type definitions for javascript-obfuscator
4+
// Project: https://github.com/sanex3339/javascript-obfuscator
5+
// Definitions by: sanex3339 <https://github.com/sanex3339>
6+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
7+
8+
declare module 'javascript-obfuscator' {
9+
export interface IOptions {
10+
compact?: boolean;
11+
debugProtection?: boolean;
12+
debugProtectionInterval?: boolean;
13+
disableConsoleOutput?: boolean;
14+
encodeUnicodeLiterals?: boolean;
15+
rotateUnicodeArray?: boolean;
16+
unicodeArray?: boolean;
17+
wrapUnicodeArrayCalls?: boolean;
18+
[id: string]: any;
19+
}
20+
21+
export class JavaScriptObfuscator {
22+
public static obfuscate (sourceCode: string, customOptions?: IOptions): string;
23+
}
24+
}

0 commit comments

Comments
 (0)