@dominicm it is just a simple require, but you have to setup the module's package.json
(`macrovich` in this case) in order for lumo
to find your namespaces, more details here https://github.com/anmonteiro/lumo/issues/130
Awesome!
I wonder if we should hold out a database of lumo packages hosted on npm...
Could we tag them?
and then do it that way
that's how other npm packages work
You mean keywords? Another idea would be prefixes like gulp-insertnamehere, but lumo-insertnamehere. Don't know, I just worry that packages that can save me the time to write interop functions won't be found.
keywords probably sounds right
I'd like to see someone make lumo-express and lumo-electron, throwing ideas out there 🙂
yes, I'd always welcome writing my code (function arg) instead of (.method (js/require "package") arg), and more example where the interop can be abstracted to clojure records/methods and simple functions. But I get your point.
that's a good point actually, there is a distinction between cljs lumo packages and javascript
lumo packages at the moment
the former will contain only clj/cljs/cljc
files...and it can be required with normal (ns myns.core (:require [...]))
the latter (the whole npm minus one package - macrovich
) can be required with eithr js/require
(old way) and (:require [bunyan[)
(new way) and contains JS code
for JS consumption, we could compile packages down in a package.json
script: {"prepare"}
step
But is a work in progress
feature on cljs require "native" js as in java
https://clojurescript.org/news/2017-07-12-clojurescript-is-not-an-island-integrating-node-modules