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

Unified Diff: templates/modules.js.tmpl

Issue 29574582: Issue 5535 - Replace our module system with webpack (Closed)
Patch Set: Addressed nit Created Oct. 13, 2017, 7:24 a.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 | « packagerEdge.py ('k') | webpack_runner.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 610a90fd6eec40a3a28ee236188b7f7af1423da7..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" %}
-{% 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 | « packagerEdge.py ('k') | webpack_runner.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld