Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

module not works until comment line 71 #4

Open
alexey2baranov opened this issue Aug 26, 2016 · 0 comments
Open

module not works until comment line 71 #4

alexey2baranov opened this issue Aug 26, 2016 · 0 comments

Comments

@alexey2baranov
Copy link

Hi!

We are using your module to load compiled Hogan templates. But we should comment this line (71)
injects.unshift("require", "exports", "module");

If this line executed the module receive arguments ("require", "exports", "module", Hogan) but should receive just (Hogan)

Compiled module Kopnik.js:

if (!!!templates) var templates = {};
define(["hogan.js"], function (Hogan) {
    return new Hogan.Template({
        code: function (c, p, i) {
            var t = this;
            t.b(i = i || "");
            t.b("<div id=\"");
            t.b(t.v(t.f("io", c, p, 0)));
            t.b("\">");
            t.b("\n" + i);
            t.b("    <div id=\"");
            t.b(t.v(t.f("io", c, p, 0)));
            t.b("_fullName\">");
            t.b(t.v(t.d("model.fullName", c, p, 0)));
            t.b("</div>");
            t.b("\n" + i);
            t.b("    <div id=\"");
            t.b(t.v(t.f("io", c, p, 0)));
            t.b("_birth\">");
            t.b(t.v(t.d("model.birth", c, p, 0)));
            t.b("</div>");
            t.b("\n" + i);
            t.b("    <div id=\"");
            t.b(t.v(t.f("io", c, p, 0)));
            t.b("_email\">");
            t.b(t.v(t.d("model.email", c, p, 0)));
            t.b("</div>");
            t.b("\n");
            t.b("\n" + i);
            t.b("    ");
            t.b("_zemla\"></div> --}}");
            t.b("\n");
            t.b("\n" + i);
            if (t.s(t.f("zemlaView", c, p, 1), c, p, 0, 236, 258, "{{ }}")) {
                t.rs(c, p, function (c, p, t) {
                    t.b(t.rp("<Zemla0", c, p, "    "));
                });
                c.pop();
            }
            t.b("\n" + i);
            if (t.s(t.f("messageViews", c, p, 1), c, p, 0, 295, 323, "{{ }}")) {
                t.rs(c, p, function (c, p, t) {
                    t.b(t.rp("<Message1", c, p, "        "));
                });
                c.pop();
            }
            t.b("\n" + i);
            t.b("    <button id=\"");
            t.b(t.v(t.f("io", c, p, 0)));
            t.b("_reload\">Обновить</button>");
            t.b("\n" + i);
            t.b("</div>");
            return t.fl();
        },
        partials: {
            "<Zemla0": {name: "Zemla", partials: {}, subs: {}},
            "<Message1": {name: "Message", partials: {}, subs: {}}
        },
        subs: {}
    });
});
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant