GithubHelp home page GithubHelp logo

paren-soup's Introduction

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? Here are the features:

  • Syntax highlighting
  • Rainbow delimiters
  • Automatic indentation
  • InstaREPL (à la Light Table)

Try the demo. 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">
    ; put any initial code here
    (println "Hello, world!")
  </div>
</div>
<script type="text/javascript" src="paren-soup.js"></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 dev. To build a release version, run boot build. I included a project.clj for Leiningen users, but haven't thoroughly tested it.

A prebuilt copy of the compiler is already in the resources directory. You can built that project yourself using boot build, but you will need to build your own copy of ClojureScript until a version is released with this patch.

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.

paren-soup's People

Contributors

oakes avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.