Introduction to the Taskfile format
Adrian Cooney

This is a great article, thanks for writing it. I love how simple the approach is.

However, I found myself wondering the whole time: why am I not just writing these things in JS with /usr/bin/node as my shebang?

Sure, having the bash/sh/zsh CLI stuff just listed out without any fanfare is less noisy. But then, the major drawback for me is that *sh is just another programming syntax I have to look up every time I need to write/modify, since it’s not my primary language, and … ya know… JS is. We are after all talking about writing stuff to help with our npm/package.json/node projects.

Instead of needing to figure out the function/if/for/var syntaxes for bash, I know exactly how those work in JS.

My question is, do you think it’s possible to achieve the goals of the “simple task runner” type syntax but using JS as the language. Could we make it as easy to list out commands in functions/etc as your examples here, and have a little helper that parses/executes them in our ./Taskfile (.js) as easily as bash does?

Do you think there’s any benefit in combining that idea with what you’ve presented here?

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.