marko-js / marko

A declarative, HTML-based language that makes building web apps fun
https://markojs.com/
MIT License
13.28k stars 641 forks source link

[Docs] We need to introduced advanced documentation for transformers and code generators #771

Closed patrick-steele-idem closed 3 years ago

fineline commented 6 years ago

As far as I can see, there is nothing in the documentation about how to create a custom tag to be used as an attribute, that does not introduce its own template but instead modifies some aspect of the element that it is applied to. Similar to an attribute directive in Angular. This wouldn't seem to be too "advanced" of a use-case? I guess this is what transformers and code-generators are for? Until documentation is written, are there any examples in any of the repositories that you could point to?

fineline commented 6 years ago

This issue:

https://github.com/marko-js/marko/issues/217

Has a bit of sample code that I can understand how a transformer works at least. Is that still the current way to use it?

fineline commented 6 years ago

Still no documentation? :(

I did find mention of a file called code-generator.js on this page: https://hackernoon.com/marko-vs-react-an-in-depth-look-767de0a5f9a6

But no description of function parameters etc.

DylanPiercey commented 3 years ago

https://markojs.com/docs/compiler/