Yes, but I would recommend using the require. It is much cleaner from the 
dependency graph perspective and tooling can support you way better. Also it is 
not that much work, maybe a couple seconds. I also tend to have a "util" 
namespace with general helper functions which is a good fit for the init stuff. 
Its better to explicitly depend on something rather than assuming it is loaded, 
you'll thank me later.

Also you should not have a namespace with such a general name. Suppose another 
library did the same thing and ship with an init ns, you'd run into all sorts 
of conflicts. Always use properly scoped namespaces (ns your-app.init) or (ns 
your-company.init).

I cannot say if its possible with other build tools but in shadow-build you 
could just add the init ns as a main to make sure it is compiled and loaded 
before any other if you still want to do it.

But like I said, you really shouldn't.

HTH,
/thomas

On Tuesday, November 11, 2014 11:34:10 AM UTC+1, Yehonathan Sharvit wrote:
> It’s very cumbersome to add  (:require [init]) manually to each file.
> 
> Is there another solution?

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to