Simplifying the syntax of Melt UI using a custom preprocessor.
What it does
We provide a custom preprocessor that aims to enhance the DX of Melt UI just a bit further. It
introduces a new action, melt, that accepts our builders as values. This helps trim down on the
boilerplate just enough to keep the markup nice and tidy. The preprocessor will then transform our
special attribute into the proper Svelte syntax.
How it works
In the simplest form, the preprocessor will take the following code:
and transform it into this:
It can handle more complex scenarios, such as a builder that is a call expression with dependencies: