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

Allow transform callback to return a promise #117

Closed
simonsmith opened this issue Dec 22, 2015 · 5 comments
Closed

Allow transform callback to return a promise #117

simonsmith opened this issue Dec 22, 2015 · 5 comments

Comments

@simonsmith
Copy link
Contributor

As part of the async API it'd be great to return a promise from the transform method. The reason is to allow usage of postcss plugins that are async, like 3.x of stylelint.

transform(css, filename) {
  return processor.use(stylelint).process(css, {from: filename});
}

Unless there's a way to do something like this already?

@MoOx
Copy link
Contributor

MoOx commented Dec 23, 2015

Don't think it's supported at the moment.
PR welcome.

@TrySound
Copy link
Member

TrySound commented Jan 9, 2016

Seems like an interesting idea of integration.
/cc @davidtheclark @jeddy3

@TrySound
Copy link
Member

TrySound commented Jan 9, 2016

@jeddy3 Only after dev merge which will be after I'll create this plugin. Give me a few days.

@simonsmith
Copy link
Contributor Author

Awesome, thanks for adding this @TrySound

@MoOx
Copy link
Contributor

MoOx commented Jan 27, 2016

So this is good now @TrySound?

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

No branches or pull requests

3 participants