You can't use the :modules feature in 0.0-2850 you need to use master. You
can do this by git cloning the repo and running "./script/build" from the
repo directory. You'll see Maven install it into your local cache, take
note of the version number. Use this in your project.clj.

HTH,
David

On Tue, Feb 17, 2015 at 9:33 PM, Edwin Park <edwin.p...@gmail.com> wrote:

> Hi David,
>
> I was super excited to see Google Closure Module support landed in
> ClojureScript, but I can't get it to work. I'm using clojurescript
> 0.0-2850. I created some dummy cljs files and I'm literally using the
> example configuration shown in the documentation here:
> https://github.com/clojure/clojurescript/wiki/Compiler-Options#modules.
> However when I compile, none of the module output-to files are generated.
> Details of my setup are below. If you can point out what I'm doing wrong
> I'd appreciate it - I'm really looking forward to using this!
>
> Thanks,
> Edwin
>
>
> Here are the contents of the resources/assets dir after compilation (lein
> cljsbuild once). Note that these are the intermediate output files created
> by the compiler but the actual output-to files are missing:
>
> resources/assets/js/cljs/core.cljs
> resources/assets/js/cljs/core.js
> resources/assets/js/com/foo/common.js
> resources/assets/js/com/foo/editor.js
> resources/assets/js/com/foo/landing.js
> resources/assets/js/constants_table.js
>
> Here is my project configuration and the dummy files I'm compiling:
>
> project.clj:
>
> (defproject foo "0.1.0-SNAPSHOT"
>   :description "FIXME: write description"
>   :url "http://example.com/FIXME";
>   :license {:name "Eclipse Public License"
>             :url "http://www.eclipse.org/legal/epl-v10.html"}
>
>   :plugins [[lein-cljsbuild "1.0.4"]]
>
>   :dependencies [[org.clojure/clojure "1.6.0"]
>                  [org.clojure/clojurescript "0.0-2850"]]
>
>   :cljsbuild {:builds [{:source-paths ["src/cljs"]
>                         :compiler {:optimizations :advanced
>                                    :output-dir "resources/assets/js"
>                                    :modules {
>                                              :common
>                                              {:output-to
> "resources/assets/js/common.js"
>                                               :entries '#{com.foo.common}}
>                                              :landing
>                                              {:output-to
> "resources/assets/js/landing.js"
>                                               :entries '#{com.foo.landing}
>                                               :depends-on #{:common}}
>                                              :editor
>                                              {:output-to
> "resources/assets/js/editor.js"
>                                               :entries '#{com.foo.editor}
>                                               :depends-on #{:common}}}}}]})
>
>
> src/cljs/com/foo/common.cljs:
>
> (ns com.foo.common)
> (defn blah [x]
>   (str "[" x "]"))
>
>
> src/cljs/com/foo/landing.cljs:
>
> (ns com.foo.landing
>   (:require [com.foo.common :refer (blah)]))
> (defn land [x]
>       (str "landing:" (blah x)))
>
>
> src/cljs/com/foo/editor.cljs:
>
> (ns com.foo.editor
>   (:require [com.foo.common :refer (blah)]))
> (defn edit [x]
>       (str "editing:" (blah x)))
>
> --
> 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.

Reply via email to