2.0.0 • Published 3 years ago

wx-md-loader v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

wx-md-loader

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

npm deps license build prs

Configuration

const rules = [
  {
    test: /\.md/,
    use: [
      {
        loader: 'babel-loader',
      },
      {
        loader: 'wx-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