Export system for Zeal #3
Replies: 1 comment 1 reply
-
The only concern here would be maintaining sanity. In the original way, the markup and style always stay together, keeping context switch minimal. The proposed way does not disrupt this in a large way, but is a slippery slope. For instance, a button tag can have padding, font and color properties. In this example, nothing stops developers from building the classes as However, the benefits we get from actually writing styles per component basis is worth it IMO, but *we'll have to enforce the rules set out in the CSS section, maybe write macros to enforce it or a custom script that does that. @yash-deepsource what do you think?
In any other case, say Shifty or Charts, I'd always expect a transpiled and bundled output, ready to be used in the browser as is. But for a component system exclusively meant for the Vue ecosystem, we need not do that. Anyone using Zeal components will bundle their app anyway, adding that step for us is just redundant. |
Beta Was this translation helpful? Give feedback.
-
CSS
normalize.css
anymore, since@tailwind base
takes care of normalization for us.index.css
if none of these use-cases match yours.Vue Files
/src/components
directory.index.ts
file that is responsible for exporting all the contents of the directory.Transpile vs Bundle/Compile
tailwind.config.js
file.mkdist
for transpiling andvite
for builds.Types
tsconfig.json
and exports types for your.vue
and.ts
files automatically.Feedback
I would love to hear feedback on specifics around:
style
block seems to get around the problems mentioned within the article. Does the proposed approach raise any concerns regarding build outputs or code style in your mind?Let's discuss anything regarding this here. Feel free to create Issues around this and tag the discussion within if required.
Beta Was this translation helpful? Give feedback.
All reactions