zandoc-react-loader
React loader for zandoc-loader
Last updated 3 years ago by youzan-lc .
MIT · Original npm · Tarball · package.json
$ cnpm install zandoc-react-loader 
SYNC missed versions from official npm registry.

zandoc-react-loader

A webpack loader to convert zandoc-loader's output to React component.

Usage

Use as a webpack loader

{
	module: {
		rules: [
			{
			test: /\.md$/,
			use: [
				'babel-loader',
				'zandoc-react-loader',
				'zandoc-loader'
			]
			}
		]
	}
}

Options

  • 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. Styles are compiled to css with precss 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.

Current Tags

  • 1.0.10                                ...           latest (3 years ago)

11 Versions

  • 1.0.10                                ...           3 years ago
  • 1.0.9                                ...           3 years ago
  • 1.0.8                                ...           3 years ago
  • 1.0.7                                ...           3 years ago
  • 1.0.6                                ...           3 years ago
  • 1.0.5                                ...           3 years ago
  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 11
This Week 11
This Month 12
Last Day 0
Last Week 1
Last Month 79
Dependencies (21)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |