Skip to content

Instantly share code, notes, and snippets.

@ktsujister
Forked from kohyama/README.md
Last active December 20, 2015 19:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ktsujister/6184513 to your computer and use it in GitHub Desktop.
Save ktsujister/6184513 to your computer and use it in GitHub Desktop.
<html>
<head>
</head>
<body>
<script type="text/javascript" src="/js/repl-test.js"></script>
</body>
</html>
(defproject repl-test "0.1.0-SNAPSHOT"
:plugins [[lein-cljsbuild "0.3.2"]]
:cljsbuild {
:builds [{
:source-paths ["src"]
:compiler {
:output-to "js/repl-test.js"
:optimizations :whitespace
:pretty-print true}}]})
(ns repl-test
(:require [clojure.browser.repl :as repl]))
(repl/connect "http://localhost:9000/repl")
@ktsujister
Copy link
Author

  1. run cljsbuild

    $ lein cljsbuild once
    
  2. start cljs repl

    $ lein trampoline cljsbuild repl-listen
    
  3. open below on browser

    http://localhost:9000/
    
  4. try out browser repl. type in below in the repl that started by step#2

    ClojureScript:cljs.user> (js/alert "foo")
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment