Re: Separating Out .cljs Content

2013-05-08 Thread Timothy Washington
Hey Jonathan, I just tried adding *base.js*. But another batch of dependency errors pop up. It just seems that there's no straightforward way of keeping *my-code.js * out of cljs' *main.js*. 1. goog.require could not find: cljs.core base.js:333

Re: Separating Out .cljs Content

2013-05-08 Thread Jonathan Fischer Friberg
That's odd, it should definitely be possible to do - I've done it before. Did you include the scripts something like this (from the dom example): goog.require('dom.test'); Jonathan On Wed, May 8, 2013 at 2:30 AM, Timothy Washington wrote: > That fixed one of the dependency problems. B

Re: Separating Out .cljs Content

2013-05-07 Thread Timothy Washington
That fixed one of the dependency problems. But now there are a bunch of other dependency errors. AndI'm not sure if I have to independently include all the library generated .js files. It looks like you have no choice but to glom your .js code into main.js. Hmmm. 1. Uncaught ReferenceError: go

Re: Separating Out .cljs Content

2013-05-07 Thread Jonathan Fischer Friberg
You have to import the google closure library when compiling without optimisation. Given your build, probably something like this: Just make sure the base.js file is actually there. Jonathan On Tue, May 7, 2013 at 10:54 PM, Timothy Washington wrote: > That's an interesting tweak. Indeed, I

Re: Separating Out .cljs Content

2013-05-07 Thread Timothy Washington
That's an interesting tweak. Indeed, I no longer have any of my contents in main.js. But I also get a JS error in my browser. goog.provide('edgar'); Uncaught ReferenceError: goog is not defined goog.require('cljs.core'); goog.require('shoreleave.remotes.http_rpc'); goog.require('clojure.browser.

Re: Separating Out .cljs Content

2013-05-07 Thread Jonathan Fischer Friberg
*DON'T DO IT* I just realised, if the :optimizations missing triggers this behaviour, it should be possible to set it to nil, and it was! So try ':optimizations nil' in your build. Jonathan On Tue, May 7, 2013 at 10:20 PM, Jonathan Fischer Friberg < odysso...@gmail.com> wrote: > I tried it, a

Re: Separating Out .cljs Content

2013-05-07 Thread Jonathan Fischer Friberg
I tried it, and I think removing the :optimizations flag will do what you want. The problem is that cljsbuild sets it to :whitespace by default, so even if you remove it from your build it's still there. To circumvent this, I opened lein-cljsbuild-0.3.0.jar in ~/.m2/repository/lein-cljsbuild/lein-

Re: Separating Out .cljs Content

2013-05-07 Thread Timothy Washington
Hey Jonathan, Saw that flag, and it's useful. But what I want to do is separate my main.js from all my other.js files. I've a more detailed description abouve. Maybe I just can't do this, but I thought I'd ask around. Tim On Tue, May 7, 2013 at 4:03 PM, Jonathan Fischer Friberg < odysso...@gma

Re: Separating Out .cljs Content

2013-05-07 Thread Timothy Washington
In my project.clj file (fig.1), cljsbuild config just points to the parent source-path. Now, I plan to have *file1.cljs* in a different directory than *file2.cljs*. But what I'm finding in this case, is that compiled *file1js*is getting it's calls glommed into *main.js*. So for example in fig.1 & 2

Re: Separating Out .cljs Content

2013-05-07 Thread Jonathan Fischer Friberg
>From the sample.project.clj: ; Determines whether the temporary JavaScript files will be left in place between ; automatic builds. Leaving them in place speeds up compilation because things can ; be built incrementally. This probably shouldn't be disabled except for troubleshooting. ; Defaults to

Re: Separating Out .cljs Content

2013-05-07 Thread David Nolen
This is why I suggested organizing the project around directories and specifying different groups of them with different lein-cljsbuild groups. On Tue, May 7, 2013 at 12:24 PM, Jonathan Fischer Friberg < odysso...@gmail.com> wrote: > I haven't used clojurescript in a while, but if I recall corre

Re: Separating Out .cljs Content

2013-05-07 Thread Jonathan Fischer Friberg
I haven't used clojurescript in a while, but if I recall correctly, the only way to not compile everything into a single file is to leave out the :optimization flag completely. If this is the case this should probably be considered a bug. I might be wrong though. Jonathan On Tue, May 7, 2013 at

Re: Separating Out .cljs Content

2013-05-07 Thread David Nolen
I believe the ClojureScript compiler simply looks for all .cljs files on the specified compile path. I think maybe you could put your files in different directories so they don't all get concatenated together. You can one build specify one path, and another build specify both paths. Perhaps other

Separating Out .cljs Content

2013-05-07 Thread Timothy Washington
This is on a Clojurescript compilation note. I've noticed that if I have a * main.cljs* and *my-other.cljs*, parts of *my-other.cljs* will appear in * main.cljs*. Is there a way to avoid this? Using *lein-cljsbuild*, any of the :optimization flags, gives the same result (in terms of adding all to *