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

Add ability to load custom PostCSS plugins #32

Merged
merged 7 commits into from
Oct 3, 2019

Conversation

gijsroge
Copy link
Member

@gijsroge gijsroge commented Oct 2, 2019

No description provided.

gijsroge and others added 7 commits October 2, 2019 21:47
The getPostCSSConfiguration function was not blocking therefore the
gulp-postcss instance was called before the config was loaded.
This caused gulp-postcss to search for the config itself and throw an
error that we did not catch when the user did not have a config.
Comment on lines +35 to +36
async function cssCompile({src, dest, minified = true, browserSync = false}) {
const {plugins, options = {}} = await getPostCSSConfiguration(minified);
Copy link
Member Author

Choose a reason for hiding this comment

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

I found the little culprit..

The function that loads the PostCSS config wasn't called in a blocking way so it continued and tried to initiate gulp-postcss before actually getting the PostCSS config therefore gulp-postcss threw an error that I didin't handle.

Now that its blocking there is always a config available. Either the config from the user or the default one we provide.

@MartijnCuppens MartijnCuppens changed the title Fix for unhandled PostCSS load config error Add ability to load custom PostCSS plugins Oct 3, 2019
@MartijnCuppens MartijnCuppens merged commit 4896611 into Intracto:master Oct 3, 2019
@gijsroge gijsroge deleted the fix/postcss-custom-config branch January 13, 2020 15:46
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