Open
Description
in markdown we currently have this
```js server
const foo = 'bar';
```
```js client
const foo = 'bar';
```
but we also have more
Markdown
## Overview
You will be able to...
Which will result in:
```js xxx
import { html } from 'lit';
const users = [
{ firstName: 'John', lastName: 'Doe' },
{ firstName: 'Jane', lastName: 'Doe' },
];
```
```js xxx
export const listOfUsers = () => html`
<ul>
${users.map(user => html`<li>${user.firstName} ${user.lastName}</li>`)}
</ul>
`;
```
```js xxx
export const listOfUsersWithFrame = () => html`
<ul>
${users.map(user => html`<li>${user.firstName} ${user.lastName}</li>`)}
</ul>
`;
```
which shows/executes the code at the place of the code block on the client
e.g. the above example would become
HTML
<h2>Overview</h2>
<p>You will be able to...</p>
<p>Which will result in:</p>
<mdjs-story mdjs-story-name="listOfUsers">
<ul>
<li>John Doe</li>
<li>Jane Doe</li>
</ul>
</mdjs-story>
<mdjs-preview mdjs-story-name="listOfUsersWithFrame">
<pre><code>[...]</code></pre>
<div slot="story">
<ul>
<li>John Doe</li><li>Jane Doe</li>
</ul>
</div>
</mdjs-preview>
Rendered
Question
now the question is... would that make sense server-side as well? I guess... and what should the key be 🤔
should it retain the story
? or a complete "new" set?
suggestion from the top of my head...
js server
js server inject
js server inject-frame
js client
js client inject
(formerjs story
)js client inject-frame
(formerjs story-preview
)
hmmm inject
, inject-frame
seems not very intuitive... anyone got better ideas? 🤔