That's actually what I thought at first, but the node example that ships
with ClojureScript actually does the same thing (uses a node function
outside of -main and then calls that function from -main) I did and it works
fine.
Here is the generated JavaScript for the failing -main and such:
portal.core.net = cljs.nodejs.require.call(null, "net");
portal.core.portal = function portal(b, c) {
return portal.core.net.createConnection(b, c)
};
portal.core._main = function(a) {
cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0);
return portal.core.portal.call(null, 1337, "localhost")
};
And here is the generated JS for the working -main:
portal.core._main = function(a) {
cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0);
return portal.core.net.createConnection(1337, "localhost")
};
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en