by paulirish · 10y ago · 0 comments
NPM?!? :)
A lot of people below are asking why a bash script (that depends on a perl script) is being recommended to install via NPM? The short reason is that NPM is the most straightforward way to get a script installed as a global binary in a cross-platform manner. This approach has worked quite well with `git-open`[0]. Asking all users to deal with the PATH is not my ideal.
In addition, I wanted a reasonable upgrade path, in case there are neccessary bugfixes. It's not a great experience if users identify bugs but the fix means they manually find it/download/PATH-ify each time. :/
That said, I'll add some Manual Install instructions to the readme so it's clear how to do this on your own. :) ( Edit: Here they are… https://github.com/stevemao/diff-so-fancy/blob/master/readme... )
Yeah, that helps a lot :)
I saw this, was like "cool, I want to use this", and then noted that it uses npm. I avoid installing ruby and node apps -- I have nothing against either, just that I currently don't use either language or have a dependency on a major tool written in those; but they pull in a lot of deps which take up space (at least, my experiences have been that many of these tools install way too much -- probably because I don't use either and all the "default libs" aren't on my system). On my previous machine I had lots of issues with this, so as a rule I avoid these things unless absolutely necessary. I know others who are of a similar opinion.
Fortunately I realized that it was just a shell script, and installed it directly :)
Really ? All Unix-like systems (incl OS X) can do this:
/usr/bin/install myscript.sh /usr/local/bin
PS: Oh, just realized that there is npm uninstall as well, but not /usr/bin/uninstall (though it's just rm -f anyway)It's really pretty awful as a distribution mechanism. Why not a simple Makefile?
Why whould someone who can't add $HOME/bin to $PATH be using git?
People who don't need to edit PATH might still need to track content.
Nodejs is a programming language.
NPM is a tool to fetch libraries for node programs.
Thus NPM and Git are software development tools.
A software developer or a power user are supposed to know what $PATH or %PATH is.
I've seen too many Python environments hosed by folks who aren't Python experts to keep suggesting that "sudo pip install <CLI tool>" is a thing most users should be doing.
CentOS/RHEL?