0.0.11 • Published 1 year ago

@vsmi/md-loader v0.0.11

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

@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