Closed Deraen closed 6 years ago
https://github.com/degree9/boot-npm Could be extended to support this, current options are limited but this was the direction I had originally planned for the task.
Looking at it. The implementation code (without task options etc.) in boot-npm + boot-exec is only ~40 lines. Currently it has a few options we wouldn't need here and it is missing probably some others. I will probably prefer to implement this completely here as it will be easier for me to maintain.
PS. cache key use looks interesting!
Have you tested how it works if you remove some dependencies? I think one needs to run npm prune
to remove removed packages from existing node_modules dir.
I have not tested that functionality specifically. I have just been deleting the cache folder and letting the task recreate it as needed. That is probably something which could be easily added tho. Each project gets its own cache folder so this is identical to having node_modules folder in project dir except it is hidden and managed by the boot task.
Feel free to use any of the code you like all MIT license.
@flyboarder This is very low on my todo list as I hope this will not be needed in a few months time. If/when we get proper Closure Module Processing support running Webpack will be unncessary as we can directly consume CommonJS/ES6 etc. modules.
First issue in getting module processing workin is http://dev.clojure.org/jira/browse/CLJS-1762
From https://github.com/cljsjs/packages/issues/396
A common use case starts to be quite evident:
We can parametrizize this like this:
Where import-files is map of path in fileset to path in working dir for npm.