dsherret / dax

Cross-platform shell tools for Deno and Node.js inspired by zx.
MIT License
1.05k stars 35 forks source link

docs: show how to extend the helpers on $ instances #76

Closed andrewbrey closed 1 year ago

andrewbrey commented 1 year ago

I think that's a great thing to implement (and then the existing helpers can just be consumers of the API)! I would love to take a look at implementing this, but my bandwidth is pretty unpredictable right now so I am hesitant to ask you to assign that one to me - I can take a look around and see if this is more complicated than just internalizing the code I put in the README in this PR :+1:

In the immediate term though, I don't think #77 being open obviates the utility of the README changes in this PR, so maybe it doesn't have to be an "instead" and could be an additional follow on item from these docs changes?

(Then once #77 is done, maybe this section of docs can be omitted / adjusted accordingly :thinking: )

dsherret commented 1 year ago

Ok, no problem! I'm going to work on it now and will put a PR up tonight.

andrewbrey commented 1 year ago

I'm going to work on it now and will put a PR up tonight.

You're a machine haha! Sounds great, I will very happily use this new API and sorry I can't commit to the time right now to build/submit it :grimacing:

andrewbrey commented 1 year ago

Feel free to close this PR if you feel it will be superseded by the new API! My goal here was just to surface some info on how to augment the $ object for those like me who want that thing to be a grab-bag of basically everything I find useful in shell scripts so that the everything is right there with no extra imports :+1:

dsherret commented 1 year ago

That's ok! I'm already familiar with this code so it's not too bad.

Thanks, it's a good idea overall, but I'd like something a little more complete and that works with $.build$(...).