lumo

:lumo: Standalone ClojureScript environment. Currently at version 1.9.0
cjsauer 2018-01-20T02:42:38.000044Z

Is it possible to compile modules consumable from JS in lumo? Something like how shadow-cljs does it: https://shadow-cljs.github.io/docs/UsersGuide.html#target-node-library

richiardiandrea 2018-01-20T02:51:48.000078Z

@cjsauer lumo runs within node so it shares all the module dependency mechanisms of node. This means you just require a module that you previously installed with npm and it just works. The syntax for requiring is the same as cljs: either in a :require or by using js/require (former is cooler 😄)

cjsauer 2018-01-20T16:02:04.000132Z

@richiardiandrea appreciate the reply. What about the other way around? Is it possible to compile cljs into a JS module, and then import it like so from JS:

import myCljsModule from './path/to/compile/module.js';
shadow-cljs does it like so: https://shadow-cljs.github.io/docs/UsersGuide.html#target-npm-module But I'm curious to see if I can get off the JVM entirely...

cjsauer 2018-01-20T16:03:02.000057Z

My whole company is pretty JS heavy, so convincing them to switch the entire ecosystem has proven difficult. Instead, I think it'd be cool to treat cljs kind of like coffeescript, where it exists right along side the standard JS build tools (webpack, etc)

richiardiandrea 2018-01-20T16:36:10.000134Z

@cjsauer yes that is doable as well, lumo also has some convention when importing other cljs npm modules. It uses the directories key of package.json for the source folder. It is still a bit experimental though