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 plugin exports via "processing" lifecycle hook #404

Merged
merged 3 commits into from Feb 21, 2018

Conversation

Projects
None yet
1 participant
@tivac
Copy link
Owner

commented Feb 21, 2018

Based on a request from @AndrewLeedham in #401, this new lifecycle hook allows for modifying the exports of a CSS file by pushing a specifically crafted message onto the messages array. Details are in the new extending.md document which also conveniently exists now to better document lifecycle hooks and what they're good for.

Planning on shipping this for 8.1.0 unless someone really hates the name and lets me know pretty quickly, it's a pretty harmless change that could allow some interesting new approaches.

tivac added some commits Feb 18, 2018

feat: add "during" hook & support export plugins
`after` should probably just become what `during` is, it's a breaking change but not terribly different in practice.

Plugins run as part of the `during` phase can add messages with a plugin name starting with `modular-css-export` and an `exports` key that will be merged into the file's exports.

Fixes #401 in a roundabout way by making it possible w/o a change to core.

This also makes the output module support non-array values because having to know that is just an awkward implementation detail that makes no sense for anyone but me.
feat: rename "during" to "processing"
It's at least a little better

@tivac tivac self-assigned this Feb 21, 2018

@tivac tivac merged commit 72a89de into master Feb 21, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@tivac tivac deleted the allow-plugin-exports branch Feb 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.