Created
May 10, 2014 20:28
-
-
Save astarr/ae47969fa976cb745ee1 to your computer and use it in GitHub Desktop.
Getting started with cljs-start and Reagent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ lein new cljs-start wonderful-lib | |
$ lein test | |
# So far, so good. Now, modify project.clj to add reagent as dependency: | |
... | |
:dependencies [[org.clojure/clojure "1.5.1"] | |
[org.clojure/clojurescript "0.0-2138"] | |
[reagent "0.4.2"]] | |
... | |
$ lein test | |
# Still good. Next, modify profiles.clj, to add react in preamble: | |
... | |
{:shared {... | |
:cljsbuild | |
{:builds {:wonderful-lib | |
{:source-paths ["test/cljs"] | |
:compiler | |
{:output-dir "dev-resources/public/js" | |
:source-map "dev-resources/public/js/wonderful_lib.js.map" | |
:preamble ["reagent/react.js"]}}} | |
... | |
$ lein do clean, test | |
# Running ClojureScript test: phantomjs | |
# TypeError: 'undefined' is not a function (evaluating 'RegExp.prototype.test.bind( | |
# /^(data|aria)-[a-z_][a-z\d_.\-]*$/ | |
# )') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@holmsand, I'm excited to start using Reagent -- thanks for writing it!
I'm hoping to get started with ClojureScript and cljs-start is a nice way to get tests, and a repl, and etc. all working at once. But, then, following the instructions to set up Reagent leads to sadness. Without a Clojure, Leiningen, Maven, ClojureScript or React background, I'm not doing a very good job of figuring out why this is failing.