A browser-based editor for ClojureScript
Clojure
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
compiler Update boot-cljs Jan 29, 2017
dev-resources/public Change how instrument is called Dec 20, 2016
prod-resources/public Update deps and instrument spec during dev Aug 15, 2016
resources/public Update cljs Jan 27, 2017
src/paren_soup
.gitattributes Ignore resources dir for language stats Aug 19, 2015
.gitignore Update gitignore Sep 28, 2016
README.md
UNLICENSE Add copyright renunciation Jul 23, 2015
boot.properties Update clojure and other libraries Feb 14, 2016
build.boot

README.md

Clojars Project

Introduction

A library providing a ClojureScript viewer and editor that you can embed in any website. No, that was not a complete sentence. And neither is this. Be a rebel, like me, by using paren-soup. CodeMirror is nice if you want to support other languages, but why would you?

Try the demo!

Here are the features:

To use paren-soup in your own website, just go to the releases section and download the latest files. In your HTML, link to one of the CSS files and use the following markup:

<div class="paren-soup">
  <div class="instarepl"></div>
  <div class="numbers"></div>
  <div class="content" contenteditable="true">(+ 1 1) ; put initial code here</div>
</div>
<script type="text/javascript" src="paren-soup.js"></script>
<script type="text/javascript">
  paren_soup.core.init_all();
</script>

If you just want a viewer, not an editor, leave out the contenteditable attribute. If you don’t want the instaREPL or line numbers, remove the relevant divs and they will not appear. To get the code out of the content element via JavaScript or ClojureScript, read its textContent property. There is no API to learn!

Build Instructions

I use Boot. To build the editor and run a server on http://localhost:3000, run boot run. To build a release version, run boot build.

A prebuilt copy of the compiler is already in the resources directory. If you want to build it yourself, go in the compiler directory and run boot build.

Licensing

All files that originate from this project are dedicated to the public domain. I would love pull requests, and will assume that they are also dedicated to the public domain.