ClojureScript implementation of a browser Read-Eval-Print-Loop
Clojure CSS JavaScript HTML Other
Latest commit 0dabe8f Oct 18, 2016 @arichiardi arichiardi committed on GitHub Merge pull request #224 from brian-dawn/brian/fix-spelling-mistake
Fix misspelling of reagent

README.md

Clojure Web Repl (clojurescript.io)

A re-frame app designed to embed a pure ClojureScript REPL in a web page. Plumbing kindly provided by Replumb Logo .

This project also employs the following libraries, whose authors we thank:

Last but not least, many kudos go to @jaredly and his Reepl with which we share the CodeMirror implementation (and yes, we released a separate component library with it).

Tooling

We recently switched this project to boot Boot Logo and we could not be more happy.

Interactive workflow

Type boot dev and then browse to http://localhost:3000.

Build

The same easy command is used to build the content directly, which will be materialized in the target folder:

boot build -t prod|dev target

The build command defaults to prod when called with no arguments.

Deploy

In order to deploy just follow the build task with deploy-s3:

export ...
export ...
boot build -t prod|dev deploy-s3

The environment variables to set up are listed here

Config

The cljs-repl-web.config/defaults var contains the configuration map:

{:name "Clojurescript.io Website"
 :production? true|false
 :base-path "root/"
 :core-cache-url "/my-cache/core.cljs.cache.aot.json")
 :src-paths ["/some/path1" "/some/path2")]
 :verbose-repl? true|false}

Serve files

Sometimes it is useful to serve files from target, for instance to check if everything works fine, kind of simulating the deployment. With boot you don't need no more python -m SimpleHTTPServer, only:

boot serve -d target wait

Check boot serve -h for the other options.

Testing

Tests at the moment use PhantomJS but there are just a few.

For headless tests you need first of all PhantomJS. Then you can:

boot test -t prod|dev

The auto-test tasks also provides automatic test execution on file change.

Featuring doo.

Other Resources

License

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

Copyright (C) 2015-16 Scalac Sp. z o.o.

Scalac scalac.io is a full-stack team of great functional developers focused around Scala/Clojure backed by great frontend and mobile developers.

On our blog we share our knowledge with community on how to write great, clean code, how to work remotely and about our culture.