Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(803)

Unified Diff: mojo/public/tools/bindings/generators/js_templates/module_definition.tmpl

Issue 643323002: [Mojo] Add support for HTML imports as well as AMD modules (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix indent Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/tools/bindings/generators/js_templates/module_definition.tmpl
diff --git a/mojo/public/tools/bindings/generators/js_templates/module.js.tmpl b/mojo/public/tools/bindings/generators/js_templates/module_definition.tmpl
similarity index 69%
rename from mojo/public/tools/bindings/generators/js_templates/module.js.tmpl
rename to mojo/public/tools/bindings/generators/js_templates/module_definition.tmpl
index 058bc1e70d0349ff66f831b1f7849fbc6e929d57..64480817db287421a8265006f210ba62ea20b59f 100644
--- a/mojo/public/tools/bindings/generators/js_templates/module.js.tmpl
+++ b/mojo/public/tools/bindings/generators/js_templates/module_definition.tmpl
@@ -1,21 +1,5 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-define("{{module.path}}", [
- "mojo/public/js/bindings/codec",
- "mojo/public/js/bindings/validator",
-{%- for import in imports %}
- "{{import.module.path}}",
-{%- endfor %}
- ], function(codec, validator
-{%- for import in imports -%}
- , {{import.unique_name}}
-{%- endfor -%}
-) {
-
{#--- Constants #}
-{% for constant in module.constants %}
+{%- for constant in module.constants %}
var {{constant.name}} = {{constant.value|expression_to_text}};
{%- endfor %}
@@ -54,6 +38,3 @@ define("{{module.path}}", [
exports.{{interface.name}}.client = {{imported_interfaces[interface.client]}};
{%- endif %}
{%- endfor %}
-
- return exports;
-});

Powered by Google App Engine
This is Rietveld 408576698