eginez / calvin

A minimalistic build tool for clojurescript projects that does not require the jvm
186 stars 9 forks source link

Can calvin fetch npm dependencies? If possible, how? #13

Open iku000888 opened 7 years ago

iku000888 commented 7 years ago

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...

eginez commented 7 years ago

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

iku000888 commented 7 years ago

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.

eginez commented 7 years ago

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

iku000888 commented 7 years ago

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

eginez commented 7 years ago

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