calvin icon indicating copy to clipboard operation
calvin copied to clipboard

Can calvin fetch npm dependencies? If possible, how?

Open iku000888 opened this issue 8 years ago • 5 comments

Sorry for occupying the bandwidth. I raised an issue as I could not figure this one out by my self as a node.js newbie...

iku000888 avatar Aug 06 '17 18:08 iku000888

Hey this is something I have been thinking about for a bit. It is not suppoted however you can use npm directly and everything else should just work. I'll start thinking about ways to add this into calvin

eginez avatar Aug 17 '17 15:08 eginez

Hey @eginez Thanks!

Just some feedback: After figuring out that stuff in node_modules gets picked up (either by calvin or lumo not sure), everything was straightforward. In retrospect I think I could have figured it out on my own with a line or two in the README. Would be happy to add a section on the README if that is fine with you.

iku000888 avatar Aug 18 '17 23:08 iku000888

By all means! Send me a PR and we'll add it to the readme

eginez avatar Aug 19 '17 01:08 eginez

I recently read this post, and thought if calvin would fetch stuff automatically it would make sense to use the :npm-deps key because ClojureScript proper supports it.

https://clojurescript.org/news/2017-07-12-clojurescript-is-not-an-island-integrating-node-modules

iku000888 avatar Aug 22 '17 01:08 iku000888

I did some investigation no how to fetch npm modules programatically https://stackoverflow.com/questions/15957529/can-i-install-a-npm-package-from-javascript-running-in-node-js/15957574#15957574.

Since it now supports npm dependencies it is feasible now to download from clojars and from npm directly at once and not have a to run those tools independently

eginez avatar Sep 09 '17 19:09 eginez