Make Custom AST compatible with the unified ecosystem #172
-
Hello! I'm building an application that consumes a custom AST structure based on Unist. Right now I'm in the process of transforming the custom AST to other well-known AST structures like mdast and hast. I was wondering if there's a recommended path to create tooling around a custom AST of some best practices recommended to follow when creating compatible tooling with new AST structures. thanks in advance! UPDATE: I found this handbook which seems a good starting point, not sure if its outdated or y'all recommend something else? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Welcome @horacioh 👋 That is a big topic, a good starting point would be reading the guides in https://unifiedjs.com/learn
That should give some pointers.
|
Beta Was this translation helpful? Give feedback.
-
quick question @ChristianMurphy, a transformer in mutate mode should always return a whole node? I mean if I'm transforming only a Literal node, do I need to wrap it inside a |
Beta Was this translation helpful? Give feedback.
Welcome @horacioh 👋
That is a big topic, a good starting point would be reading the guides in https://unifiedjs.com/learn
Then reading through some of the previous related questions:
That should give some pointers.
After reading through, there may still be some more specific questions.
Those would be welcome, as you ask them, it could be good to include context on what you are trying to build.
Things like: