From a549ed0ec8eda5f6302c9f1495129af9e635cb54 Mon Sep 17 00:00:00 2001 From: jeetiss Date: Fri, 27 Jul 2018 17:11:37 +0300 Subject: [PATCH 1/2] add peer dependency, ipdate install instruction --- packages/razzle-plugin-mdx/README.md | 19 +++++++++---------- packages/razzle-plugin-mdx/package.json | 3 +++ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/packages/razzle-plugin-mdx/README.md b/packages/razzle-plugin-mdx/README.md index 2a21bfed6..634155fcd 100644 --- a/packages/razzle-plugin-mdx/README.md +++ b/packages/razzle-plugin-mdx/README.md @@ -5,23 +5,22 @@ This package contains a plugin for using mdx with Razzle ## Usage in Razzle Projects ``` -npm i razzle-plugin-mdx +npm i razzle-plugin-mdx @mdx-js/tag ``` or ``` -yarn add razzle-plugin-mdx +yarn add razzle-plugin-mdx @mdx-js/tag ``` - ### Using the plugin with the default options ```js // razzle.config.js module.exports = { - plugins: ['mdx'], + plugins: ["mdx"] }; ``` @@ -29,18 +28,18 @@ module.exports = { ```js // razzle.config.js -const images = require('remark-images') -const emoji = require('remark-emoji') +const images = require("remark-images"); +const emoji = require("remark-emoji"); module.exports = { plugins: [ { - name: 'mdx', + name: "mdx", options: { mdPlugins: [images, emoji] - }, - }, - ], + } + } + ] }; ``` diff --git a/packages/razzle-plugin-mdx/package.json b/packages/razzle-plugin-mdx/package.json index f9be4c039..94ccaf4de 100644 --- a/packages/razzle-plugin-mdx/package.json +++ b/packages/razzle-plugin-mdx/package.json @@ -16,5 +16,8 @@ "devDependencies": { "jest": "20.0.4", "razzle": "^2.2.0" + }, + "peerDependencies": { + "@mdx-js/tag": ">=0.14.1" } } From 3dd7e18ddb73df6686d4dc9e52f7548f83d3e9dd Mon Sep 17 00:00:00 2001 From: jeetiss Date: Fri, 27 Jul 2018 17:15:24 +0300 Subject: [PATCH 2/2] update readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9ba4e1a51..46d6c998f 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,7 @@ As of Razzle 2.0, you can add your plugins to modify your setup. * [TypeScript](https://github.com/jaredpalmer/razzle/tree/master/packages/razzle-plugin-typescript) * [Vue](https://github.com/jaredpalmer/razzle/tree/master/packages/razzle-plugin-vue) * [Elm](https://github.com/jaredpalmer/razzle/tree/master/packages/razzle-plugin-elm) +* [MDX](https://github.com/jaredpalmer/razzle/tree/master/packages/razzle-plugin-mdx) * [See All](https://www.npmjs.com/search?q=razzle-plugin) #### Using Plugins