| 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 -%} |