mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-23 00:46:16 -04:00
Add a fake require
to go with the fake exports
.
This commit is contained in:
parent
fc68a25b21
commit
da95016228
3 changed files with 9 additions and 1 deletions
|
@ -303,8 +303,11 @@ function tarCode(filesInOrder, files, write) {
|
|||
|
||||
// Wrap the following code in a self executing function and assign exports to
|
||||
// global. This is a first step towards removing symbols from the global scope.
|
||||
// exports is global and require is a function that returns global.
|
||||
function isolateJS(code) {
|
||||
return '(function (exports) {'+code+'\n}(function () {return this}()));\n';
|
||||
return '(function (exports, require) {'
|
||||
+ code + '\n'
|
||||
+ '}(function () {return this}(), (function (path) {return (function () {return this}())})));\n';
|
||||
}
|
||||
|
||||
function compressJS(values)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue