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(exposeConfig): nested properties #583
feat(exposeConfig): nested properties #583
Conversation
If this approach isn't desirable, potentially this can be altered to have each object as a module (eg Line 163 in 96adbbd
|
Refactored to use templates instead (still need to look into type declarations). Example usage would be: import screens from '#tailwind-config/theme/screens' // or import { _screens } from '#tailwind-config/theme'
import neutral from '#tailwind-config/theme/colors/neutral' // or import { _neutral } from '#tailwind-config/theme/colors' Admittedly, these are a lot of files, so the previous approach can be considered if required. Note: |
Updated function to allow developers to choose how deep they want the templates to go. There's also a commented-out condition that can give the option to not create exports for single non-object values if required (tried to merge it with the previous condition using |
Sorry for the late answer, updated the level to start a 1 (which makes sense IMO, 0 being the whole This means tat And more, easy to check with http://localhost:3000/_vfs I am happy with current state, could you please update the documentation to explain those changes and the benefits of it please? |
✅ Deploy Preview for tailwindcss ready!
|
Updated docs (also for inclusive language), and added a test. My concern is still with type definitions I feel! Edit: I've reverted the changes to the Also want to confirm about |
Beautiful work! |
While working on #582, I've also looked into how to create exports for nested properties in the large tailwind configuration, and these properties can be accessed using exports in camelCase. There have been use-cases (for me at least) where I need a small part of the configuration, such as
theme.screens
ortheme.colors.neutral
instead of all oftheme
(which is quite big), so I can just doand that should do it!
I believe this isn't a major requirement right now, and may need feedback as well (hence I'm also putting this as a draft PR).
Edit: see changes at this point through - main...ineshbose:nuxt-tailwindcss-module:ba8bf7e2f3e1d907e0ab7b1a29a03dfd6d0bcde7