Yes, it worked! Thanks!

For future reference here's the working code:

(ns signal.timeline
    (:require #?@( :clj [[clj-time.core :as time]
                         [clj-time.format :as time-format]]
                  :cljs [[cljs-time.core :as time]
                        [cljs-time.format :as time-format]]
    ))
)


Em domingo, 30 de outubro de 2016 16:04:03 UTC-2, Colin Yates escreveu:
>
> you need to splice the vectors. Flying by so no time but the CLJX 
> example at http://clojure.org/guides/reader_conditionals gives an 
> example. 
>
>
>
> On 30 October 2016 at 17:45, Ricardo Mayerhofer <ricar...@gmail.com 
> <javascript:>> wrote: 
> > Hi all, 
> > I'm developing an isomorphic project with ClojureScript and Clojure. In 
> > order to solve conditional dependencies I'm trying to use reader 
> > conditionals just like the code below: 
> > 
> > (ns signal.timeline 
> >     (:require #?( :clj  [clj-time.core :as time] 
> >                         [clj-time.format :as time-format] 
> >                   :cljs [cljs-time.core :as time] 
> >                         [cljs-time.format :as time-format] 
> >     )) 
> > ) 
> > 
> > 
> > The project runs fine in Clojure, however in ClojureScript I get the 
> > following error, as if it were trying to read clj part and trying to 
> resolve 
> > Clojure symbols: 
> > 
> > 
> > lein cljsbuild once prod 
> > 
> > Feature should be a keyword: [clj-time.format :as time-format] {:type 
> > :reader-exception, :line 3, :column 58, :file 
> > 
> "/Users/ricardomayerhofer/Projetos/GB/signal-clojurescript/src/signal/timeline.cljc"}
>  
>
> > 
> > My configs are as follow: 
> > 
> > 
> > :dependencies [[org.clojure/clojure "1.8.0"] 
> >                [org.clojure/clojurescript "1.9.293"] 
> >                [binaryage/dirac "0.7.2"] 
> >                [binaryage/devtools "0.8.2"] 
> >                [com.andrewmcveigh/cljs-time "0.4.0"] 
> >                [expectations "1.4.35"] 
> >                [clj-time "0.11.0"] 
> >                [cljs-ajax "0.5.8"]] 
> > :plugins [[lein-figwheel "0.5.4-7"] 
> >           [lein-cljsbuild "1.1.4"] 
> >           [lein-expectations "0.0.8"] 
> >           [lein-autoexpect "1.7.0"] 
> >           ] 
> > 
> > :cljsbuild { 
> >             :builds {:dev { 
> >                            :source-paths ["src"] 
> >                            :figwheel true 
> >                            :compiler {:preloads [devtools.preload 
> > dirac.runtime.preload] 
> >                                       :source-map true 
> >                                       :optimizations :none 
> >                                       :asset-path 
> > "http://localhost:3002/js/out"; 
> >                                       :output-to 
> > "resources/public/js/main.js" 
> >                                       :output-dir 
> > "resources/public/js/out"}} 
> >                      :prod { 
> >                             :source-paths ["src"] 
> >                             :compiler {:asset-path 
> > "https://static.takeabridge.com/js/out"; 
> >                                        :optimizations :advanced 
> >                                        :pretty-print false 
> >                                        :output-to 
> > "resources/public/js/main.js"}}}}) 
> > 
> > Any idea? Thanks! 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "Clojure" group. 
> > To post to this group, send email to clo...@googlegroups.com 
> <javascript:> 
> > Note that posts from new members are moderated - please be patient with 
> your 
> > first post. 
> > To unsubscribe from this group, send email to 
> > clojure+u...@googlegroups.com <javascript:> 
> > For more options, visit this group at 
> > http://groups.google.com/group/clojure?hl=en 
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "Clojure" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to clojure+u...@googlegroups.com <javascript:>. 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to