Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove promise-each dependency #281

Merged
merged 1 commit into from
May 10, 2017
Merged

Remove promise-each dependency #281

merged 1 commit into from
May 10, 2017

Conversation

jonathantneal
Copy link
Member

index.js Outdated
stmt.media = joinMedia(media, stmt.media || [])
return Promise.resolve(statements).then(function(stmts) {
return stmts.reduce(function(promise, stmt) {
return promise.then(function() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but perhaps we should have a comment here to explain that this cleverness works on the array in series.

Copy link
Member Author

@jonathantneal jonathantneal May 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ll add a comment. I’m actually glad to see the reduce and then terminology used here instead of each, because each did not make me aware that this was processing the statements in “synchronous” sequence.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

- Resolves #275
- Removes any-promise subdependency
- Removes runtime assert from promise-each
@RyanZim RyanZim merged commit 1389208 into postcss:master May 10, 2017
@RyanZim
Copy link
Collaborator

RyanZim commented May 10, 2017

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants