If you use :optimizations :whitespace, you can pass a :preample like: :preamble ["react/react.min.js"]
That will prepend react to the generated om_app.js. On Sat, Jun 21, 2014 at 12:36 PM, Roger Gilliar <[email protected]> wrote: > I followed to instructions on the cljsbuild page. My project file now looks > like this: > > :test > {:source-paths ["src/cljs" "test/cljs"] > :compiler {:output-to "resources/private/js/unit-test.js" > :optimizations :whitespace > :pretty-print true}}} > > :test-commands {"unit-tests" ["phantomjs" :runner > "resources/public/js/om_app.js" > "resources/private/js/unit-test.js"]}}) > > The tests run but I got two errors. The "Can't find variable: React" is > expected. The " Can't find variable: goog" not. > > Output: > ============= > Running ClojureScript test: unit-tests > ReferenceError: Can't find variable: goog > > resources/public/js/om_oanda.js:1 > ReferenceError: Can't find variable: React > > resources/private/js/unit-test.js:35517 > > Testing example.first > > Ran 4 tests containing 4 assertions. > Testing complete: 0 failures, 0 errors. > > > The questions are: > > 1.) What is the recommended way to include external libs like React ? Pass > it to phantom as a js file or pass a html file that loads the libs ? > > 2.) Why do I get the "Can't find variable: goog" error ? > > 3.) Is there something like autotest ? > > -- > 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.
