React loader for zandoc-loader
npm install zandoc-react-loaderA webpack loader to convert zandoc-loader's output to React component.
Use as a webpack loader
```
{
module: {
rules: [
{
test: /\.md$/,
use: [
'babel-loader',
'zandoc-react-loader',
'zandoc-loader'
]
}
]
}
}
* jsTemplate: path to js template file, uses babel-template.
Note: babel-generator has trouble with jsx generation, it will escape
all unicode sequences resulting in incorrect jsx code.
Available properties in the template:
* SECTIONS: All sections in the file, style, demo and markdown. precss
Styles are compiled to css with
demos 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 sample/template.js`.