Re: [ClojureScript] google closure modules and the :main compiler option

2015-12-08 Thread Thomas Heller
On Tuesday, December 8, 2015 at 12:25:24 AM UTC+1, ewen wrote:
> Would you also consider a patch to make the :main option to accept a 
> collection of namespaces? 

shadow-build is fine with that, expects it in fact. Not really sure why cljs 
allows multiple :entries per :module but :main only allows one. In shadow-build 
everything is built with regards to modules, eg. the typical build with one 
output-file is just a build with one module. How many you add after that is up 
to you. So all options that apply to modules always apply, there is no seperate 
path for modules/non-modules.

Makes things far easier to reason about IMHO.

YMMV,
/thomas

-- 
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.


Re: [ClojureScript] google closure modules and the :main compiler option

2015-12-07 Thread David Nolen
An enhancement patch to make :modules work with :none is welcome.

David

On Sun, Dec 6, 2015 at 4:48 PM, ewen  wrote:

> Hi,
>
> The :main option of the ClojureScript compiler is very useful to be able
> to leave HTML markup identical between dev and production. However, its
> purpose is defeated when using google closure modules because it can only
> output one file and require one namespace.
>
> A possible solution would be to allow :optimzations :none when :modules
> are enabled. The compiler would emit multiple main files, each requiring
> the namespaces it depends on.
>
> Any thoughts on this?
>
> Ewen.
>
> --
> 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.
>

-- 
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.


Re: [ClojureScript] google closure modules and the :main compiler option

2015-12-07 Thread ewen
Great! I will work on that.

@Thomas: Thanks, I will have a look at shadow-build


-- 
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.


Re: [ClojureScript] google closure modules and the :main compiler option

2015-12-07 Thread ewen
Would you also consider a patch to make the :main option to accept a collection 
of namespaces? When optimizations are enabled, the closure compiler may 
concatenate multiple namespaces, thus I think this change would make sense.

Also, don't you think the browser repl environment should be given the 
possibility to output a main js file at startup? This file could contain a call 
to clojure.browser.repl/connect, making the browser repl simpler to start.

-- 
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.


Re: [ClojureScript] google closure modules and the :main compiler option

2015-12-07 Thread David Nolen
Not interested in :main taking a collection of namespaces. The browser REPL
issue is broader, needs more consideration, and even has an existing JIRA
issue.

David

On Mon, Dec 7, 2015 at 6:25 PM, ewen  wrote:

> Would you also consider a patch to make the :main option to accept a
> collection of namespaces? When optimizations are enabled, the closure
> compiler may concatenate multiple namespaces, thus I think this change
> would make sense.
>
> Also, don't you think the browser repl environment should be given the
> possibility to output a main js file at startup? This file could contain a
> call to clojure.browser.repl/connect, making the browser repl simpler to
> start.
>
> --
> 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.
>

-- 
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.


[ClojureScript] google closure modules and the :main compiler option

2015-12-06 Thread ewen
Hi,

The :main option of the ClojureScript compiler is very useful to be able to 
leave HTML markup identical between dev and production. However, its purpose is 
defeated when using google closure modules because it can only output one file 
and require one namespace.

A possible solution would be to allow :optimzations :none when :modules are 
enabled. The compiler would emit multiple main files, each requiring the 
namespaces it depends on.

Any thoughts on this?

Ewen.

-- 
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.