-
Notifications
You must be signed in to change notification settings - Fork 8
Allow MarkdownIt plugins to be supplied as Strings rather than functions #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This enables us plugins to be set in Webpack v1 where configuration can only be given as JSON serialisable values, so functions don't work. (Reason I'm still using Webpack v1: I'm using Gatsby as a static site generator and they haven't upgraded yet)
Codecov Report
@@ Coverage Diff @@
## develop #27 +/- ##
======================================
Coverage 100% 100%
======================================
Files 9 9
Lines 119 122 +3
Branches 25 25
======================================
+ Hits 119 122 +3
Continue to review full report at Codecov.
|
|
Well, I tried to add a fixture to test that we have coverage on the "specifying MarkdownIt plugins as strings" functionality, but I'm having trouble reading the diff in the Jest snapshot file to see if it's had adverse affects. Does it seem okay to you @ticky or does the giant snapshot diff mean I've broken something? It's still working well for me on my local tests |
|
The giant snapshot diff is really difficult to understand, sorry about that. I got a bit over-excited at the potential and unfortunately it’s gotten a bit out of hand. I’ve moved your additional spec to be its own individual spec, which now means there’s only a single block addition to the snapshot, which is a bit more clear. Your code didn’t break anything - good stuff! I’ve updated the Readme a bit, but I don’t have a Webpack 1.x project on hand to test - can you confirm whether you can use |
ticky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pending confirmation that the readme does not lie, I’m feeling happy to merge this and cook you up a release with it! 😄
|
Thanks for the clean-up, so much better! (And sorry it's taken me so long to get back to you). I can confirm that the README is correct and is working on my Webpack 1 Gatsby project. Thanks again, looking forward to the release so I can stop having a git-fork in my package.json 😄 |
|
Thanks for the confirmation! I’ll get this cooked up into a release imminently so you can update your references :) |
|
Just published in v1.1.0. :) |
|
🎉 thank you!!! |
This enables us plugins to be set in Webpack v1 where configuration can only be given as JSON serialisable values, so functions don't work.
(Reason I'm still using Webpack v1: I'm using Gatsby as a static site generator and they haven't upgraded yet)