3 ms·
It is similar, but you need to have npm installed first don't you? With gradle you typically interact with it through a shell script (aka gradle wrapper) and th
by dlandis 11y ago
It is similar, but you need to have npm installed first don't you? With gradle you typically interact with it through a shell script (aka gradle wrapper) and that downloads the correct version of gradle if it isn't already present in the project directory and then gradle downloads the dependencies. The person who sets up the project would generate the wrapper script using gradle.
- aikah 11y ago> It is similar, but you need to have npm installed first don't you? Same thing for gradle, you need to install it at first place. There is absolutely no difference except the language that is being used. And yes you can use shell scripts with npm too, except your shell scripts aren't going to run on windows.
- dikaiosune 11y agoDoes npm have this? https://docs.gradle.org/current/userguide/gradle_wrapper.html https://docs.gradle.org/current/userguide/gradle_wrapper.htm... I think that's what GP was referring to -- it's not a shell script for automating use of the tool, it's a shell script for automating acquisition and initialization of the tool.
- aikah 11y agoWhen you fetch a package with npm, the package will either be : a library(installed locally) or a command line tool (installed globally). You can also run any number of tasks per project (npm run <task>), described in the npm manifest, or execute tasks before or after installing, and before publishing a library.
- dikaiosune 11y agoRight, but that doesn't address how you acquire/install/configure npm itself, which is one of the main benefits of having gradlew[.bat].
- TheAceOfHearts 11y agoYou need to have node installed already. Once it's installed you'll have npm because it's bundled with node. I googled quickly for gradlew.bat and from the first link I opened it looks like it depends on java being installed already. Node already includes npm because it's the official package manager. Java doesn't include gradle, presumably because they have multiple options and none of them is considered the official one?
- dikaiosune 11y agoI wasn't aware of the implicit "if you have node you have npm" relationship -- thanks for clearing that up.