Skip to content

Commit

Permalink
Add support for markdown to react storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
dangreenisrael committed Nov 13, 2017
1 parent 8c8b35a commit 6dafcde
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 3 deletions.
2 changes: 2 additions & 0 deletions app/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,14 @@
"glamor": "^2.20.40",
"glamorous": "^4.11.0",
"global": "^4.3.2",
"html-loader": "^0.5.1",
"html-webpack-plugin": "^2.30.1",
"json-loader": "^0.5.7",
"json-stringify-safe": "^5.0.1",
"json5": "^0.5.1",
"lodash.flattendeep": "^4.4.0",
"lodash.pick": "^4.4.0",
"markdown-loader": "^2.0.1",
"postcss-flexbugs-fixes": "^3.2.0",
"postcss-loader": "^2.0.8",
"prop-types": "^15.6.0",
Expand Down
11 changes: 11 additions & 0 deletions app/react/src/server/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,17 @@ export default function() {
include: includePaths,
exclude: excludePaths,
},
{
test: /\.md$/,
use: [
{
loader: 'html-loader',
},
{
loader: 'markdown-loader',
},
],
},
],
},
resolve: {
Expand Down
30 changes: 27 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4398,6 +4398,13 @@ es6-symbol@3.1.1, es6-symbol@^3.1.1, es6-symbol@~3.1.1:
d "1"
es5-ext "~0.10.14"

es6-templates@^0.2.2:
version "0.2.3"
resolved "https://registry.yarnpkg.com/es6-templates/-/es6-templates-0.2.3.tgz#5cb9ac9fb1ded6eb1239342b81d792bbb4078ee4"
dependencies:
recast "~0.11.12"
through "~2.3.6"

es6-weak-map@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f"
Expand Down Expand Up @@ -6079,7 +6086,17 @@ html-entities@^1.2.0:
version "1.2.1"
resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f"

html-minifier@^3.2.3:
html-loader@^0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/html-loader/-/html-loader-0.5.1.tgz#4f1e8396a1ea6ab42bedc987dfac058070861ebe"
dependencies:
es6-templates "^0.2.2"
fastparse "^1.1.1"
html-minifier "^3.0.1"
loader-utils "^1.0.2"
object-assign "^4.1.0"

html-minifier@^3.0.1, html-minifier@^3.2.3:
version "3.5.6"
resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.6.tgz#7e4e661a09999599c7d8e8a2b8d7fb7430bb5c3e"
dependencies:
Expand Down Expand Up @@ -8396,6 +8413,13 @@ markdown-extensions@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/markdown-extensions/-/markdown-extensions-1.1.0.tgz#fba0f1a2ebb4f4123d25b7a93bc35792c11f504e"

markdown-loader@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/markdown-loader/-/markdown-loader-2.0.1.tgz#eed8bead82978bacf17b76a11c5593a013e2d976"
dependencies:
loader-utils "^1.1.0"
marked "^0.3.6"

markdown-table@^1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-1.1.1.tgz#4b3dd3a133d1518b8ef0dbc709bf2a1b4824bc8c"
Expand Down Expand Up @@ -11122,7 +11146,7 @@ recast@^0.10.10:
private "~0.1.5"
source-map "~0.5.0"

recast@^0.11.17:
recast@^0.11.17, recast@~0.11.12:
version "0.11.23"
resolved "https://registry.yarnpkg.com/recast/-/recast-0.11.23.tgz#451fd3004ab1e4df9b4e4b66376b2a21912462d3"
dependencies:
Expand Down Expand Up @@ -12980,7 +13004,7 @@ through2@^2.0.0, through2@^2.0.2:
readable-stream "^2.1.5"
xtend "~4.0.1"

through@2, "through@>=2.2.7 <3", through@X.X.X, through@^2.3.4, through@^2.3.6, through@^2.3.8, through@~2.3, through@~2.3.1, through@~2.3.8:
through@2, "through@>=2.2.7 <3", through@X.X.X, through@^2.3.4, through@^2.3.6, through@^2.3.8, through@~2.3, through@~2.3.1, through@~2.3.6, through@~2.3.8:
version "2.3.8"
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"

Expand Down

0 comments on commit 6dafcde

Please sign in to comment.