You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In GDM modes helpful for documentation I often wish I could show (preview) the implementation of a component, helper, modifier, etc. write some documentation and then show live examples of their use.
Currently to do this the entire implementation must be copy/pasted in every codeblock as there is not a way to import something from an earlier code block.
Suggestion
Offer a way to register a filename for a codeblock allowing other codeblocks to import them using a ./ relative path.
Perhaps maybe with a filename:{FILENAME} in the codefence metadata line?
The text was updated successfully, but these errors were encountered:
I'm a big fan -- based on your suggestion, it could look like this:
text here in md
```gjs live filename="demo-a"
export const DemoA = <template> ... </template><template> <DemoA /></template>``````gjs live
import { DemoA } from './demo-a';<template> Again! <DemoA /></template>```
In GDM modes helpful for documentation I often wish I could show (preview) the implementation of a component, helper, modifier, etc. write some documentation and then show live examples of their use.
Currently to do this the entire implementation must be copy/pasted in every codeblock as there is not a way to
import
something from an earlier code block.Suggestion
Offer a way to register a filename for a codeblock allowing other codeblocks to import them using a
./
relative path.Perhaps maybe with a
filename:{FILENAME}
in the codefence metadata line?The text was updated successfully, but these errors were encountered: