0.1.1 • Published 5 years ago

bisheng-plugin-codebox v0.1.1

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

bisheng-plugin-codebox

This plugin is modified from bisheng-plugin-react.

To convert JSX which is written in Markdown to React.Element and source code wrapped with a code box.

Usage

Install:

npm i --save bisheng-plugin-codebox

Add 'bisheng-plugin-codebox to bisehng.config.js's plugins.

module.exports = {
  plugins: ['bisheng-plugin-react?lang=jsx'],
};

API

lang: String

default: 'react-component'

babelConfig: Object

default: { presets: [ 'react', ['env', { targets: { browsers: 'last 2 versions', 'Firefox ESR', '> 1%', 'ie >= 8', 'iOS >= 8', 'Android >= 4', }, }], ], plugins: 'transform-class-properties', 'transform-object-rest-spread', , }

noreact: Boolean

default: false

Whether to import React and ReactDOM automatically.

License

MIT