Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merged.

  • Loading branch information...
commit 7f3d92303e5994feae5e16f5699b89009ea7b93f 2 parents d73fc51 + 5fe720a
David Nolen authored
Showing with 45 additions and 1 deletion.
  1. +42 −0 README.cli.md
  2. +2 −0  README.md
  3. +1 −1  project.clj
42 README.cli.md
View
@@ -0,0 +1,42 @@
+# cljs-demo
+
+
+To get to a command line repl that runs code directly in the browser, rather than using Sublime Text 2, check the README.cli.md
+
+From this repo's directory run:
+
+```shell
+lein deps
+```
+
+To get this project's dependencies.
+
+In order to have the most pleasant workflow you should setup lein-cljsbuild to watch your ClojureScript files with
+
+```shell
+lein cljsbuild auto
+```
+
+in another shell
+```shell
+lein trampoline cljsbuild repl-listen
+```
+
+in another shell
+```shell
+open index.html || firefox index.html || chrome index.html
+```
+
+You may need to refresh the browser if you don't get a response right away.
+
+Now, in the shell where you ran repl-listen, your clojurescript repl is connected directly to the browser. You can try it by running
+
+```clojure
+(js/alert "Hey, it works!")
+```
+
+From here, you can interact with the DOM, or print to the console directly from the clojurescript repl.
+
+Copyright © 2012 David Nolen
+
+Distributed under the Eclipse Public License, the same as Clojure.
2  README.md
View
@@ -7,6 +7,8 @@ and finally, install Leiningen 1.7.
From the Sublime Text 2 menu, Preferences > Browse Packages. You'll be taken to the Packages folder, open
SublimeREPL/config/Clojure/Main.sublime-menu. Add a new command that looks like this:
+To get to a command line repl that runs code directly in the browser, rather than using Sublime Text 2, check the README.cli.md
+
```javascript
{"command": "repl_open",
"caption": "ClojureScript",
2  project.clj
View
@@ -11,4 +11,4 @@
:pretty-print true}}
#_{:source-path "src"
:compiler {:optimizations :advanced
- :output-to "mainadv.js"}}]})
+ :output-to "mainadv.js"}}]})
Please sign in to comment.
Something went wrong with that request. Please try again.