Skip to content
This repository has been archived by the owner on Jun 22, 2018. It is now read-only.

Extend sequence API #3

Closed
wekyle opened this issue May 4, 2016 · 3 comments
Closed

Extend sequence API #3

wekyle opened this issue May 4, 2016 · 3 comments
Milestone

Comments

@wekyle
Copy link
Collaborator

wekyle commented May 4, 2016

The sequence API is kinda weird, in that you usually end up passing an array of words broken by spaces, for example ['npm', 'install'].

I've yet to see a use case that breaks that pattern, actually.

We could save users some keystrokes (and headaches) by allowing them to pass in a string (for example, npm install, which will be broken down into the command and array of arguments to be passed into exec behind the scenes.

@wekyle
Copy link
Collaborator Author

wekyle commented May 4, 2016

Backwards compatibility would be nice as well

@wekyle wekyle modified the milestone: 1.0.0 May 4, 2016
@wekyle wekyle changed the title Simplify sequence API Extend sequence API May 10, 2016
@wekyle
Copy link
Collaborator Author

wekyle commented May 10, 2016

Let's add support for promise-returning functions as well.

@wekyle
Copy link
Collaborator Author

wekyle commented May 17, 2016

As of d6772b2, we prefer sequences to be arrays of strings, not arrays of arrays as before. It helps that child_process.exec, which we adopted in #1, accepts commands with arguments as a single string.

This is simpler, easier to type, and easier to read when editing a target!

I've added in legacy support for arrays for backwards compatibility- this will be removed...someday....

Arbitrary functions are forthcoming.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant