Skip to content

somecho/cljs-compiler-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CLJS Compiler Compiler

A compiler to compile CLJS's compiler...

Seriously now

After reading David Nolen write about compiling ClojureScript in the browser, I wanted to try it out myself. Unfortunately, the article is from 2015 and he covered the topic only from a high level.

This project is to expose cljs/compile-str to be callable from JS. Inspired by the Klipse project.

Usage

git clone https://github.com/somecho/cljs-compiler-compiler
cd cljs-compiler-compiler
lein cljsbuild once

There will now be a cljs.js file in /js. You can then add this as a script to your html document.

Alternatively, a prebuilt JS script is already packaged in this repo.

cljs.compile("(+ 1 1)")
// returns '((1 + 1))\n'

About

Exposing the CLJS compiler to JS

Topics

Resources

License

Stars

Watchers

Forks