I'm planning a base app which loads and unloads cljs mini-apps into the
main app, one at a time. The problem domain is such that there are simply
too many mini-apps to load upfront.
Is lein-cljs build clever enough to generate exports and externs so that
these modules can talk to each other? For second prize, is it possible to
metadatum stuff and have lein-cljs generate an appropriate externs file?
On Friday, March 30, 2012 8:45:18 PM UTC+2, Evan Mezeske wrote:
> I can confirm Mark Rathewell's note; that's part of what lein-cljsbuild is
> meant to do.
>
> With his configuration, the script1.js and script2.js files would both be
> built, and each would only contain the code from the project1 or project2
> directories, respectively (unless they require code from outside
> namespaces, then that would be included too).
>
> Running "lein cljsbuild once" would build both cljs subprojects in
> parallel, and "lein cljsbuild auto" would watch both for modifications and
> rebuild them as needed.
>
> -Evan
>
> On Friday, March 30, 2012 10:49:29 AM UTC-7, Mark Rathwell wrote:
>>
>> I haven't tried yet, but lein-cljsbuild [1] is meant to support
>> multiple builds, and I believe something like the below config would
>> be what you are looking for:
>>
>> :cljsbuild {
>> :builds
>> [{:source-path "src/cljs/project1"
>> :compiler {:output-to "resources/public/cljs/script1.js"
>> :externs ["externs/jquery.js"]
>> :optimizations :advanced
>> :pretty-print true}}
>> {:source-path "src/cljs/project2"
>> :compiler {:output-to "resources/public/cljs/script2.js"
>> :externs ["externs/jquery.js"]
>> :optimizations :advanced
>> :pretty-print true}}]}
>>
>> [1] https://github.com/emezeske/lein-cljsbuild
>>
>>
--
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