Ah ok thanks! - I did this and now the module output-to files are generated, 
but they are all empty:

[esp@pogo ~/Code/test/foo]$ ls -l resources/assets/js/
total 0
-rw-r--r--  1 esp  staff    0 Feb 18 05:44 common.js
-rw-r--r--  1 esp  staff    0 Feb 18 05:44 editor.js
-rw-r--r--  1 esp  staff    0 Feb 18 05:44 landing.js
drwxr-xr-x  6 esp  staff  204 Feb 18 05:44 out

Here's my updated 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-2884"]]

  :cljsbuild {:builds [{:source-paths ["src/cljs"]
                        :compiler {:optimizations :advanced
                                   :output-dir "resources/assets/js/out"
                                   :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}}}}}]})


On Tuesday, February 17, 2015 at 9:37:27 PM UTC-5, David Nolen wrote:
> 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 <[email protected]> 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 [email protected].
> 
> To post to this group, send email to [email protected].
> 
> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to