Skip to content

Instantly share code, notes, and snippets.

View daKmoR's full-sized avatar
❤️
Web Components & open-wc

Thomas Allmer daKmoR

❤️
Web Components & open-wc
View GitHub Profile
@daKmoR
daKmoR / Markdium-JSON.json
Created April 13, 2020 21:22
Markdium-Introducing mdjs - interactive demos everywhere
"scripts": {
"storybook": "start-storybook",
}
@daKmoR
daKmoR / Markdium-JavaScript.js
Created April 13, 2020 21:22
Markdium-Introducing mdjs - interactive demos everywhere
{
html: '<h1>This is my component</h1><my-component></my-component>',
jsCode: "import './my-component.js';"
}
@daKmoR
daKmoR / Markdium-JavaScript.js
Created April 13, 2020 21:22
Markdium-Introducing mdjs - interactive demos everywhere
const stories = [{ key: 'demo', story: demo, code: demo }];
for (const story of stories) {
const storyEl = rootNode.querySelector(`[mdjs-story-name="${story.key}"]`);
storyEl.story = story.story;
storyEl.code = story.code;
}
@daKmoR
daKmoR / Markdium-JavaScript.js
Created April 13, 2020 21:22
Markdium-Introducing mdjs - interactive demos everywhere
export default {
title: 'My Group/My Awesome Component',
};
@daKmoR
daKmoR / Markdium-JSON.json
Created April 13, 2020 21:22
Markdium-Introducing mdjs - interactive demos everywhere
"scripts": {
"start": "es-dev-server",
}
@daKmoR
daKmoR / Markdium-Markdown.text
Last active April 13, 2020 21:42
Markdium-Introducing mdjs - interactive demos everywhere
import { Chart } from '../components/chart'
# Here’s a chart
The chart is rendered inside our MDX document.
@daKmoR
daKmoR / Markdium-JavaScript.js
Created April 13, 2020 21:22
Markdium-Introducing mdjs - interactive demos everywhere
module.exports = {
stories: ['../README.md', '../docs/**/*.md'],
esDevServer: {
nodeResolve: true,
watch: true,
open: true,
},
};
@daKmoR
daKmoR / Markdium-HTML.html
Created April 13, 2020 21:22
Markdium-Introducing mdjs - interactive demos everywhere
<demo-1 />
@daKmoR
daKmoR / Markdium-JavaScript.js
Created April 13, 2020 21:22
Markdium-Introducing mdjs - interactive demos everywhere
const { mdjsTransformer } = require('@mdjs/core');
module.exports = {
nodeResolve: true,
open: 'README.md',
watch: true,
responseTransformers: [mdjsTransformer],
};
@daKmoR
daKmoR / Markdium-JavaScript.js
Created April 13, 2020 21:22
Markdium-Introducing mdjs - interactive demos everywhere
{
html: '<h1>This is my component</h1><my-component></my-component>',
jsCode: "import './my-component.js';",
stories: [
key: 'demo',
name: 'demo',
code: 'export const demo = () => `<my-component header="from attribute"></my-component>`',
]
}