Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: templates/modules.js.tmpl

Issue 29549786: Issue 5535 - Replace our module system with webpack (Closed)
Patch Set: Created Sept. 19, 2017, 2:23 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « packagerSafari.py ('k') | webpack.config.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: templates/modules.js.tmpl
diff --git a/templates/modules.js.tmpl b/templates/modules.js.tmpl
deleted file mode 100644
index 48f681b2b6a4c37abcb9a0e37f115c35dbeb5302..0000000000000000000000000000000000000000
--- a/templates/modules.js.tmpl
+++ /dev/null
@@ -1,49 +0,0 @@
-{%- if args["module"] -%}
-if (typeof require != "function")
-{
- var require = function(module)
- {
- if (!(module in require.scopes))
- {
- let scope = {exports: {}};
- require.scopes[module] = require.modules[module](scope, scope.exports);
- }
- return require.scopes[module];
- };
- require.modules = Object.create(null);
- require.scopes = Object.create(null);
-}
-
-{% if args["injectinfomodule"] %}
-require.modules["info"] = function(module, exports)
-{
-{% if type == "gecko-webext" %}
-{% include "geckoInfo.js.tmpl" %}
-{% elif type == "chrome" %}
-{% include "chromeInfo.js.tmpl" %}
-{% elif type == "edge" %}
-{% include "edgeInfo.js.tmpl" %}
-{% endif %}
-return module.exports;
-};
-{% endif %}
-
-{%- for module_name, script in modules -%}
-require.modules[{{ module_name|json }}] = function(module, exports)
-{
-{{ script }}
-return module.exports;
-};
-
-{% endfor -%}
-{%- set modules = dict(modules) -%}
-{%- for module_name in args["autoload"] -%}
-{%- if module_name in modules -%}
-require({{ module_name|json }});
-{% endif %}
-{%- endfor -%}
-{%- else -%}
-{%- for module_name, script in modules -%}
-{{ script }}
-{% endfor -%}
-{%- endif -%}
« no previous file with comments | « packagerSafari.py ('k') | webpack.config.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld