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

Unified Diff: templates/modules.js.tmpl

Issue 29363565: Issue 4552 - Drop jshydra dependency (buildtools) (Closed)
Patch Set: Addressed feedback, make tox pass Created Nov. 30, 2016, 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
« releaseAutomation.py ('K') | « releaseAutomation.py ('k') | tox.ini » ('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
new file mode 100644
index 0000000000000000000000000000000000000000..3793ef67ee9147924f99b8bc62d8579d294dad6e
--- /dev/null
+++ b/templates/modules.js.tmpl
@@ -0,0 +1,17 @@
+{%- if args["module"] -%}
+{%- for module_name, script in modules -%}
+require.modules[{{ module_name|json }}] = function(module, exports)
+{
+{{ script }}
+return module.exports;
+};
+
+{% endfor -%}
+{%- for module_name in args["autoload"] -%}
+require({{ module_name|json }});
Wladimir Palant 2016/11/30 14:54:44 It's probably a good idea to check first whether t
kzar 2016/11/30 15:26:18 Done.
+{% endfor %}
+{%- else -%}
+{%- for module_name, script in modules -%}
+{{ script }}
+{% endfor -%}
kzar 2016/11/30 14:29:45 `{%` not `{%-` so that the require calls are separ
+{%- endif -%}
« releaseAutomation.py ('K') | « releaseAutomation.py ('k') | tox.ini » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld