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 multiple plugins in the PostCSS options map #9016

Merged
merged 1 commit into from
Oct 10, 2021

Conversation

jmooring
Copy link
Member

@jmooring jmooring commented Oct 9, 2021

Usage:
{{ $options := dict "use" "autoprefixer postcss-color-alpha" }}
{{ $style := resources.Get "main.css" | resources.PostCSS $options }}

Fixes #9015

@jmooring
Copy link
Member Author

jmooring commented Oct 9, 2021

While a slice of plugins would be more elegant, this approach is:

  1. Consistent with how multiple plugins are specified using postcss-cli
  2. Backwards compatible
  3. Simple

Realistically, when more complex setups are required, users should (a) create a postcss configuration file, or (b) create a postcss object within the project's package.json file.

@bep
Copy link
Member

bep commented Oct 9, 2021

Can you rebase this against master?

Usage:
{{ $options := dict "use" "autoprefixer postcss-color-alpha" }}
{{ $style := resources.Get "main.css" | resources.PostCSS $options }}

Fixes gohugoio#9015
@jmooring
Copy link
Member Author

jmooring commented Oct 9, 2021

Rebase completed.

@bep bep merged commit 64abc83 into gohugoio:master Oct 10, 2021
@jmooring jmooring deleted the iss9015 branch October 10, 2021 13:15
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to specify multiple plugins in the PostCSS options map
2 participants