JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q72115F
  • License MIT

Package Exports

  • remarkdown-loader

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (remarkdown-loader) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

remarkdown-loader

With remarkdown-loader, you can render react element in markdown convenient!

npm version build status npm downloads

install

$ npm i -D remarkdown-loader

Usage

webpack.config.js

'module': {
  'loaders': [{
    'loaders': ['babel', 'remarkdown'],
    'test': /\.md$/,
  }]
}

So you can render react element in markdown like this:

```js-precode
import Demo from './Demo';
```

current language: $={props.language}

## code:

```js
class Demo extends Component {
  xxx
}
```

## sample

${Demo}

support babel-plugin-code

With babel-plugin-code, you can render the demo and demo source code toghether.

'module': {
  'loaders': [{
    // using remarkdown-doc to render react element
    'test': /\.md$/,
    'loader': 'babel!remarkdown?Demo=remarkdown-doc',
  }, {
    // using babel-plugin-code
    test: /\.js$/,
    loader: 'babel',
    query: {
      plugins: [['code']],
    },
  }],
}

You can set param Demo to remarkdown-laoder. In this example, it use remarkdown-doc as custom Demo renderer. The result is as below.

img

img

License

MIT

Copyright (c) 2015-2016 Recharts Group