Hi i am developing a sdk in java, in the sdk the users will provide the node modules names. Is there any way to download those npm packages in java with all its dependencies without forcing the end user to install npm?
You can start by studying npm's registry api. You can look for packages by appending the package name at the end like this http://registry.npmjs.org/express and you just have to parse the returned json and look for the latest tarball urls (if you're looking for the latest distribution, else you can code your plugin to look for specific versions). And then look for the dependencies entries and do the same for them (access the api and download the tarballs). You can actually find more info at their docs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With