This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-15
Channels
- # adventofcode (121)
- # bangalore-clj (5)
- # beginners (46)
- # boot-dev (9)
- # cider (20)
- # cljs-dev (7)
- # cljsrn (1)
- # clojure (341)
- # clojure-austin (7)
- # clojure-greece (144)
- # clojure-india (3)
- # clojure-italy (5)
- # clojure-spain (1)
- # clojure-spec (34)
- # clojure-sweden (3)
- # clojure-uk (90)
- # clojurescript (24)
- # core-async (1)
- # core-logic (7)
- # cursive (108)
- # datascript (2)
- # datomic (39)
- # events (1)
- # fulcro (225)
- # graphql (8)
- # hoplon (86)
- # instaparse (12)
- # jobs-discuss (2)
- # jvm (4)
- # keechma (1)
- # lein-figwheel (2)
- # leiningen (12)
- # off-topic (26)
- # onyx (35)
- # other-languages (1)
- # pedestal (3)
- # planck (11)
- # re-frame (12)
- # reagent (12)
- # reitit (5)
- # spacemacs (48)
- # specter (29)
- # sql (2)
- # test-check (1)
- # unrepl (71)
I'm feeling lazy and didn't search for longer than 3 minutes:
Can I import NPM or node modules via Planck?
@tbaldridge No… Planck is based on plain JavaScriptCore and doesn’t have support for js/require
. You should be able to do this in Lumo, though. It is actually based on Node.
thanks for the info!
No problem. At times I’ve thought about implementing it in Planck. I haven’t done any research to see how much would be involved.
I suppose the real killer would be, even if Planck could successfully load some JavaScript properly via js/require
, then that JavaScript might expect other Node capabilities to be available in the ambient environment, like the filesystem and process stuff. The Node API would be a huge thing to replicate.
Yeah, it looks like implementing Node's module system might not be out of reach. That would let Planck successfully load things like https://www.npmjs.com/package/long
I was patching the require for a pr for lumo, didn't seem super complicated the logic here https://github.com/hlolli/lumo/blob/bb79bf95784a3d0fee76a65e23b5c889d22be406/scripts/requirePatch.js