@vsmi/md-loader
TypeScript icon, indicating that this package has built-in type declarations

0.0.15 • Public • Published

@vsmi/md-loader

A simple webpack loader used to parse markdown fence block to JS executable code

npm node deps tests prs code style: prettier

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 default true , control whether or not to use configuration whose

  • cwd: string default process.cwd(), specify the reference directory for scanning, and try to control to the minimum group to reduce the consumption

  • template: string default use modulewx-api-docs

  • groups: array Indicates the route entry information generated by the scan

  • inject: object default {}, you can inject some data by yourself

  • type: string default default, enum value can be default or source,default used to parse markdown and source used to generate markdown meta information

LICENSE

MIT

Package Sidebar

Install

npm i @vsmi/md-loader

Weekly Downloads

16

Version

0.0.15

License

MIT

Unpacked Size

47.2 kB

Total Files

26

Last publish

Collaborators

  • ixw2017