@vsmi/md-loader
v0.0.15
Published
a simple loader parse markdown fence block to JS executable code
Downloads
1
Maintainers
Readme
@vsmi/md-loader
A simple webpack loader used to parse markdown fence block to JS executable code
Configuration
const rules = [
{
test: /\.md/,
use: [
{
loader: 'babel-loader',
},
{
loader: '@vsmi/md-loader',
groups: [
{
title: 'Docs Center',
route: '/docs',
basePath: './docs',
},
{
title: 'My Components',
route: '/components',
basePath: './components',
},
],
},
]
}
]
Options
configFile
:boolean
defaulttrue
, control whether or not to use configuration whosecwd:
string
defaultprocess.cwd()
, specify the reference directory for scanning, and try to control to the minimum group to reduce the consumptiontemplate:
string
default use modulewx-api-docs
groups:
array
Indicates the route entry information generated by the scaninject:
object
default{}
, you can inject some data by yourselftype:
string
defaultdefault
, enum value can bedefault
orsource
,default
used to parse markdown andsource
used to generate markdown meta information
LICENSE
MIT