DEV Community


Discussion on: Meet zx: A Better Way to Write Scripts with Node.js

lakatos88 profile image
Alex Lakatos 🥑 Author

Yeah, I think it's still very new, and might mature in the future. I have high hopes for it.

I don't usually think about shell scripts as accepting arguments, I usually build CLIs for that use case, with things like oclif or js-fire. But when I was trying to use arguments in zx even if for the sake of my example, I did miss a better way to parse arguments than process.argv. Hopefully it's something they'll add in the near future.

vonheikemen profile image

Looking throught the issues it does appear like the maintainer wants to keep things as simple as possible. Doesn't look too eager to change things. Anyway, is still a good project.

You know I just remembered something: one can actually install this tool directly from github. So, people could fork this project, tweak a little bit and then install the fork like this.

npm install --global github:<some-user-name>/zx
Enter fullscreen mode Exit fullscreen mode

That would be an interesting use of this npm install feature.

Thread Thread
lakatos88 profile image
Alex Lakatos 🥑 Author

Oh, that's a really good idea. Especially since the work required would be minimal, for example using minimist for arguments would imply adding a few lines for importing the package and exposing it within the scope of zx.