feat: use mdcrenderer component and parsemarkdown util outside nuxt#154
feat: use mdcrenderer component and parsemarkdown util outside nuxt#154farnabaz merged 10 commits intonuxt-content:mainfrom
Conversation
Allow utilizing the MDCRenderer component and parseMarkdown utility in a normal Vue app.
ede0037 to
148b959
Compare
|
Thanks for the issue and PR @adamdehaven, As for example in README, I think it will be even better if we move them into docs/ and have a dedicated page for Using in Vue project |
Ah perfect; removing those imports will definitely simplify things in the host app. I was going to see about refactoring away the other
I can put together an example in the docs, but I couldn't get the docs site to work for me locally. What am I missing? 😬 @farnabaz let me know if I can help with anything; otherwise I'll wait to hear back from you in the next day or two |
Hmm, let's ignore it README is fine for now :) |
|
@adamdehaven I've updated your PR, do you mind checking in your project to confirm functionality? |
|
@farnabaz I can confirm the changes work in my project locally, and I have also updated the Code Sandbox with the latest changes. I also pushed a couple updates to the README (couple typos, and a few words on the new implementation). |
|
@farnabaz any idea when the npm release will be published? |
|
I made a little change in runtime exports and just released new version |
Allow utilizing the
MDCRenderer.vuecomponent andparseMarkdownutility in a normal Vue app, outside Nuxt.I've updated the
@nuxtjs/mdcmodule in this PR along with updates to the primary README for usage instructions.I've also created a CodeSandbox demo by building the package, running
npm pack, and importing the changes into the sandbox via a localnuxtjs-mdc-local.tgzbundle.Please see the README file in the PR as well as the CodeSandbox for a usage example.
@farnabaz @antfu I'd appreciate some eyes on this; mainly around:
#mdc-*imports but wasn't sure of the downstream impact.createShikiHighlighterutil along with therehypeHighlightand passing it into theparseMarkdownutility. This works great in my opinion, but just want to make sure this is good as a long-term solution?MDCRenderer.vuesetup function.When merged, this will resolve #155.