summaryrefslogtreecommitdiff
path: root/mojo/public/tools/bindings/generators/js_templates/module.amd.tmpl
blob: 1616e7c9d7820eeefa4eddfe88698ca8e6116113 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright 2014 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}}", [
{%- if module.path !=
         "mojo/public/interfaces/bindings/interface_control_messages.mojom" and
       module.path !=
         "mojo/public/interfaces/bindings/pipe_control_messages.mojom" %}
    "mojo/public/js/bindings",
{%- endif %}
    "mojo/public/js/codec",
    "mojo/public/js/core",
    "mojo/public/js/validator",
{%- for import in imports %}
    "{{import.module.path}}",
{%- endfor %}
], function(
{%- if module.path !=
         "mojo/public/interfaces/bindings/interface_control_messages.mojom" and
       module.path !=
         "mojo/public/interfaces/bindings/pipe_control_messages.mojom" -%}
bindings, {% endif -%}
codec, core, validator
{%- for import in imports -%}
    , {{import.unique_name}}
{%- endfor -%}
) {

{%- include "module_definition.tmpl" %}

  return exports;
});