A webpack loader to convert
markdown-doc-loader's output to React component.
markdown-doc-loader converts a markdown file to a list of sections. There're three
types of section: markdown, style and demo.
Use as a webpack loader
module:rules:test: /\.md$/use:'babel-loader'loader: requireoptions:jsTemplate: pathrenderers:markdown: 'Markdown'style: 'Style'demo: 'Demo''markdown-doc-loader'
jsTemplate: path to js template file, uses
renderers: a map of component names to different types of sections
Available properties in the template:
SECTIONS: All sections in the file,
markdown. Styles are compiled to css with
precssdemos are code fragments that return a React node markdowns are compiled to html
IMPORTS: All imports from demos
DEMO_DECLARATIONS: Declarations for demos
Take a look at