Skip to content

Minimal CLJS project for demonstrating the protocol issues with CLJS r1978

License

Notifications You must be signed in to change notification settings

magomimmo/minimal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minimal

A minimal CLJS project for demonstrating the protocol issues with CLJS r1978.

How to use it

Clone the project

git clone https://github.com/magomimmo/minimal.git

Compile the project

lein compile
Compiling ClojureScript.
Compiling "dev-resources/public/js/whitespace.js" from ["src/cljs" "dev-resources/tools/repl"]...
Successfully compiled "dev-resources/public/js/whitespace.js" in 11.199011 seconds.

Run the ring server

lein repl
Compiling ClojureScript.
nREPL server started on port 50868 on host 127.0.0.1
REPL-y 0.2.1
Clojure 1.5.1
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
    Exit: Control+D or (exit) or (quit)

user=> (require '[ring.server :as http])
nil
user=> (http/run)
2013-10-29 17:14:33.266:INFO:oejs.Server:jetty-7.6.8.v20121106
2013-10-29 17:14:33.296:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:3000
#<Server org.eclipse.jetty.server.Server@c8a3c71>
user=>

Launch the brepl

You now have two options to launch a browser connect REPL:

Traditional

Open a new terminal windows, cd in the main project directory, and issue:

lein trampoline cljsbuild repl-listen
Running ClojureScript REPL, listening on port 9000.
"Type: " :cljs/quit " to quit"
WARNING: Symbol ICounted is not a protocol at line 14 /Users/mimmo/Developer/minimal/src/cljs/minimal.cljs
WARNING: Symbol cljs.core/IMeta is not a protocol at line 5 /Users/mimmo/Developer/minimal/src/cljs/minimal/testing.cljs
WARNING: Symbol cljs.core/IWithMeta is not a protocol at line 5 /Users/mimmo/Developer/minimal/src/cljs/minimal/testing.cljs
WARNING: Symbol cljs.core/IMeta is not a protocol at line 5 /Users/mimmo/Developer/minimal/src/cljs/minimal/testing.cljs
WARNING: Symbol cljs.core/IWithMeta is not a protocol at line 5 /Users/mimmo/Developer/minimal/src/cljs/minimal/testing.cljs
WARNING: Symbol ICounted is not a protocol at line 14 /Users/mimmo/Developer/minimal/src/cljs/minimal.cljs
ClojureScript:cljs.user>

With Piggieback

If you use the Piggieback lib, you do not receive any warnings.

Evaluate the following expression from the the REPL where you ran the ring server:

user=> (browser-repl)
Type `:cljs/quit` to stop the ClojureScript REPL
nil
cljs.user=>

Activate the brepl connection

Visit the localhost:3000 url, wait a moment for the connection to be establish and start BREPLing.

License

Copyright (C) 2013 Giacomo (Mimmo) Cosenza aka Magomimmo

Distributed under the Eclipse Public License, the same as Clojure.

About

Minimal CLJS project for demonstrating the protocol issues with CLJS r1978

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published