mori runtime dependency
orlin opened this issue · comments
I'm working on datomiki, a datomic rest client written in ki, and I just realized I need mori in order to use it - the compiled code can't run on its own. Or I figured it's better to depend on ki, so that a newer mori does not break things. Here is the error from datomiki@0.0.3
:
/Users/om/Dev/apf/node_modules/datomiki/datomiki.js:115
return mori;
^
ReferenceError: mori is not defined
at _ki.modules.mori (/Users/om/Dev/apf/node_modules/datomiki/datomiki.js:115:28)
at Object.<anonymous> (/Users/om/Dev/apf/node_modules/datomiki/datomiki.js:118:10)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/Users/om/Dev/apf/context/routes/api/sources/index.js:1:71)
at Module._compile (module.js:456:26)
Is this intentional? Maybe ki could --include
mori in the output? Perhaps with a new convenient option e.g. -a, --autonomous
?
Great to learn about datomiki. Embedding mori makes sense for this use case, I'll do it in the next few days.
Thanks. And whenever... I plan to use ki on the server-side so I can have proper no-string-injection edn for queries. Good to have the option not to -- I'd publish it with mori included, to not cause surprises to surprise users (not sure I can easily do both with and without mori, via npm). The front-end may be trickier, there I guess ki may pair up better with datascript? A browserify plugin may be needed for that though...
Done, let me know if this works for you. I'll cut a new release now.