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

Migrate simple PostCSS setup #14612

Merged
merged 14 commits into from
Oct 10, 2024
Merged

Conversation

philipp-spiess
Copy link
Member

This PR attempts to detect simple postcss setups: These are setups that do not load dynamic modules and are based off the examples we are recommending in our docs. We detect wether a config is appropriate by having it use the object plugin config and by not requiring any other modules:

module.exports = {
  plugins: {
    tailwindcss: {},
    autoprefixer: {},
  },
}

When we find such a config file, we will go over it line-by-line and attempt to:

  • Upgrade tailwindcss: to '@tailwindcss/postcss':
  • Remove autoprefixer if used

We then attempt to install and remove the respective npm packages based on the package manger we detect.

And since we now have logic to upgrade packages, this also makes sure to install tailwindcss@next at the end of a sucessful migration.

@philipp-spiess philipp-spiess force-pushed the feat/migrate-simple-postcss-setups branch 2 times, most recently from c87d7d6 to d2662d8 Compare October 7, 2024 12:51
Copy link
Member

@RobinMalfait RobinMalfait left a comment

Choose a reason for hiding this comment

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

We have some failing tests 🤔

@philipp-spiess philipp-spiess force-pushed the feat/migrate-simple-postcss-setups branch from e5934fb to 7494dd8 Compare October 8, 2024 09:24
Copy link
Member Author

@philipp-spiess philipp-spiess left a comment

Choose a reason for hiding this comment

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

Some comments from my call with @RobinMalfait that I will fix up 👍

Copy link
Contributor

@thecrypticace thecrypticace left a comment

Choose a reason for hiding this comment

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

Just a couple things but otherwise looks good!

@philipp-spiess philipp-spiess force-pushed the feat/migrate-simple-postcss-setups branch from 60fde28 to ffd7417 Compare October 10, 2024 11:02
@RobinMalfait RobinMalfait merged commit 75b9066 into next Oct 10, 2024
1 check passed
@RobinMalfait RobinMalfait deleted the feat/migrate-simple-postcss-setups branch October 10, 2024 13:09
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.

3 participants