4 ms·
This is not much related to the project itself, but I don't like this recent trend of implementing command line tools in Node. Command line tools are minimal an
by integricho 10y ago
This is not much related to the project itself, but I don't like this recent trend of implementing command line tools in Node. Command line tools are minimal and should be usable on bare-bones systems, without requiring a whole cutting edge runtime to be installed, be it Python or Node or whatever.
I understand many don't agree with this, but this is my preference / opinion.
- devwastaken 10y agoMaking command line tools in node is pretty awful in my experience. Node is meant to be used async, which makes simple dev tools like looping over a bunch of .zips and extracting them a total pain. Pretty much every library or method of doing something in node.js is going to lead back to promises, and the second that happens your entire app becomes promises. Its massive overkill for most small dev tools.
- askmike 10y agoI'd argue async/await is almost no overhead, code flow becomes synchronous again.
- askmike 10y agoThe code linked to is written in bash and doesn't require nodejs.
- bartread 10y agoYes, but it's packaged and distributed via npm: https://www.npmjs.com/package/git-standup https://www.npmjs.com/package/git-standup. (And note the package.json in the repo.)
- bartread 10y agoI sort of feel the same way. If it's meant to work within the node ecosystem, go for it, but if not, just ship an executable. Of course, the reason this is happening is that there's a bunch of people now writing command line tools in JavaScript because that's what they use and know. Just like in the past (and now) there were a bunch of people doing it in Perl, Ruby, etc. It's definitely not very UNIX-y in its ethos, but I can understand why it happens.
- lr4444lr 10y agoAgreed, but I'm not bothered if the tools' sole purpose is to run - on the same hardware - software whose own minimal requirements make installation the CLI runtime env a trivial addition.
- chias 10y agoI have never written anything in Node so can't comment directly on whether it's a good language for CLI tools, but: > Command line tools are minimal and should be usable on bare-bones systems I disagree. I run a very graphical desktop, but nonetheless have a strong preference towards CLI tools when they are for relatively simple tasks. I think this tool makes sense as a CLI tool rather than as a non-CLI tool. Given that, the question comes down to "given that this will be a CLI tool, what language should the author have used?". In almost all cases, unless portability is a string concern, this comes down to personal preference.
- icefox 10y agoOn that topic this tool has a built in directory searching, but why bother doing that when there already exists a generic git tool to execute any git command in multiple git repositories? You could run 'git map standup' and see it for all of the repos > By default the script searches only in the current directory or one level deep. If you want to increase that, use the -m switch. $ git standup -m 3
- eridius 10y ago`git map` isn't a built-in git command.