Skip to content

Instantly share code, notes, and snippets.

@arichiardi
Created May 22, 2018 22:35
Show Gist options
  • Save arichiardi/d930a3c744b4e8dd6e3ec1097b5a69e9 to your computer and use it in GitHub Desktop.
Save arichiardi/d930a3c744b4e8dd6e3ec1097b5a69e9 to your computer and use it in GitHub Desktop.

lumo logo

Lumo Unbundled

This is a proposal for creating a new package along with lumo-cljs containing all the un-bundled JavaScript files needed for the current lumo to work, like:

  • target/bundle.min.js
  • target/main.js
  • target/main.js.map
  • all the cljs deps files + source maps in target

The goal would be to obtain a TypeScript-like experience when developing ClojureScript projects, where lumo would JIT transpile and evaluate on the installed node runtime instead of using its own binary.

Advantages

  • no compilation/bundle fiddling, meaning one can potentially use node bundle.js, basically getting lumo on Raspberry would be straightforward (see anmonteiro/lumo#374)

  • we could embed lumo in existing node applications (see anmonteiro/lumo#306)

  • existing tooling that allows transpilers to hook against them would work OOTB, one existing example is mocha - this could be achieved:

    mocha --compilers lumo-cljs/register --recursive ./test
    
  • one could also use node --inspect against their (JS transpiled) app. I know this is uncommon for Clojure devs but very node-ish

  • less friction when a JavaScript develop starts working in ClojureScript, basically what only lumo can do is to become JS-friendly "for real", this has already started with the deployment of packages on npm, but it can be further expanded.

Disadvantages

  • a couple of weeks of work

  • two modules to deploy

  • ?

@mattbishop
Copy link

What are the two modules to deploy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment