-
Notifications
You must be signed in to change notification settings - Fork 370
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
feat(plugin-tailwind): automatically read tailwind config file #4517
feat(plugin-tailwind): automatically read tailwind config file #4517
Conversation
🦋 Changeset detectedLatest commit: 4829d7e The changes in this PR will be included in the next version bump. This PR includes changesets to release 268 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #4517 +/- ##
==========================================
- Coverage 57.59% 51.99% -5.60%
==========================================
Files 672 673 +1
Lines 17794 18439 +645
Branches 3876 4275 +399
==========================================
- Hits 10249 9588 -661
- Misses 6934 8160 +1226
- Partials 611 691 +80 ☔ View full report in Codecov by Sentry. |
Summary
Ref: #4509
🤖 Generated by Copilot at b81008d
This pull request adds a new feature to the
@modern-js/cli/plugin-tailwind
package, which allows users to customize the tailwind CSS configuration using atailwind.config.{ts,js}
file in the project root directory. It also updates the documentation and the tests to reflect this change. It refactors some code and types to improve the modularity and readability of the package. It adds a dependency to the@modern-js/node-bundle-require
package, which is used to bundle and require the tailwind config file. It adds a changeset file to generate a patch-level update message for the package.Details
🤖 Generated by Copilot at b81008d
@modern-js/plugin-tailwindcss
package (link)@modern-js/node-bundle-require
package in@modern-js/cli/plugin-tailwind
package (link)cli.ts
file of@modern-js/cli/plugin-tailwind
package to use the newloadConfigFile
andgetTailwindConfig
functions from theconfig.ts
file, and update the import and export of thedesignTokenPlugin
function (link, link, link, link, link, link, link, link)config.ts
file to@modern-js/cli/plugin-tailwind
package that exports theloadConfigFile
andgetTailwindConfig
functions, which handle the logic of finding, requiring, and merging the tailwind configuration sources (link)utils.ts
file to a newmacro.ts
file in@modern-js/cli/plugin-tailwind
package for better modularity and readability (link, link)types.ts
file of@modern-js/cli/plugin-tailwind
package to reflect the new tailwind configuration sources and structure (link)app/tools/tailwindcss.mdx
andbasic-features/css.mdx
files of@modern-js/document/main-doc
package, both in English and Chinese, to explain the new feature of using thetailwind.config.{ts,js}
file and the priority and override of the tailwind configuration sources (link, link, link, link, link)replaceRules
option to themodern.config.ts
file of@modern-js/document/main-doc
package, which is used to replace theFRAMEWORK_MAJOR_VERSION
flag with the actual framework major version (link)tests/integration
directory to match the new tailwind configuration feature and structure (link, link, link, link, link)tailwind.ts
file from@modern-js/cli/plugin-tailwind
package, as its content has been moved to theconfig.ts
file (link)Related Issue
Checklist
pnpm run change
.