Check this: https://github.com/emezeske/lein-cljsbuild/blob/0.2.1/doc/CROSSOVERS.md
On Sat, May 26, 2012 at 12:49 AM, Stephen Cagle <[email protected]> wrote: > I have a file (tree.clj) that I have written. All is well with that file. I > want to use this file from both clojure and clojurescript. > > I can see that this works fine on the clojure side of things, as I type (at > the repl) >> (use 'rpc.tree) and get back nil, I can then go ahead and do > whatever with the methods of tree. > > *** Yes, the name of my project is rpc, I named a namespace tree, I am a > monster. *** > > However, as stated, I also want to use this rpc.tree namespace in > clojurescript, so in my .cljs file, I have the following > (ns rpc.client.main > (:require [rpc.tree :as tree]) > (:require-macros [fetch.macros :as fm])) > > However, when I type lein cljsbuild once I get > > Compiling ClojureScript. > Compiling "resources/public/main.js" from "src"... > May 25, 2012 3:38:57 PM com.google.javascript.jscomp.LoggerErrorManager > println > SEVERE: > /home/user/Downloads/rpc/.lein-cljsbuild-compiler-0/rpc/client/main.js:3: > ERROR - required "rpc.tree" namespace never provided > goog.require('rpc.tree'); > ^ > > ERROR: JSC_MISSING_PROVIDE_ERROR. required "rpc.tree" namespace never > provided at > /home/user/Downloads/rpc/.lein-cljsbuild-compiler-0/rpc/client/main.js line > 3 : 0 > May 25, 2012 3:38:57 PM com.google.javascript.jscomp.LoggerErrorManager > printSummary > WARNING: 1 error(s), 0 warning(s) > Successfully compiled "resources/public/main.js" in 31.036385773 seconds. > > So, it appears that Clojurescript is incapable of seeing my Clojure file. > How do I use a clojure file in clojurescript? > > > If it helps, here is my project.clj file > > (defproject rpc "0.1" > :description "A attempt at getting just rpc working" > :dependencies [[org.clojure/clojure "1.4.0"] > [compojure "1.1.0"] > [fetch "0.1.0.personal1"] > [org.clojure/core.cache "0.5.0"] > [com.datomic/datomic "0.1.3157" > :exclusions [org.slf4j/jul-to-slf4j org.slf4j/slf4j-nop]] > [org.slf4j/slf4j-jdk14 "1.6.4"] > [hiccup "1.0.0"]] > :plugins [[lein-swank "1.4.4"] > [lein-cljsbuild "0.1.10"] > [lein-ring "0.7.0"]] > :ring {:handler rpc.server/app} > :cljsbuild { > :builds [{:source-path "src" > :compiler {:output-to "resources/public/main.js" > :optimizations :advanced > :externs ["jquery.min.js"] > :pretty-print true}}]} > :hooks [leiningen.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 -- Moritz Ulrich -- 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
