sindresorhus / grunt-shell

Run shell commands
MIT License
949 stars 126 forks source link

Allow functions as shorthand commands #118

Closed teogeos closed 5 years ago

teogeos commented 6 years ago

The documentation declares command as being of type string or Function, and states that it can be "omitted by directly setting the target with the command". It made me believe that I could directly pass a function as a target, but this actually only works for strings. This PR allows passing a function as target and omitting command.

teogeos commented 6 years ago

Sorry for the PR after two years ^^

I fixed CI errors. If you prefer setting the node engine to >=6, use a newer version of xo and make a major version bump tell me and i'll update the PR (I'll let you do the version bump I guess).

teogeos commented 5 years ago

@sindresorhus hello, do you think there's any chance this could be merged ?

sindresorhus commented 5 years ago

Sorry for the delay. Thanks for fixing this :)

teogeos commented 5 years ago

No problem, thanks for merging :)