syntax-tree / hast-to-hyperscript

Legacy utility to transform hast to something else

Home Page:https://unifiedjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for Vue

medfreeman opened this issue · comments

placeholder
I'll use this space for describing what specsare needed to add proper support for Vue.js 2 createElement.
The end goal is to code a remark-vue plugin.

commented

@medfreeman Wait, so are you still filling in this issue? Anything I can help with?

Sure, but that will have to wait at least a week. I took a shortcut in the meantime. I am in the process of making nuxt-community/nuxtent more modular, and wanted to give the option to replace its 'markdown-it' instance by anything (remark), to then use it with remark-generic-extensions and (soon to be) 'remark-vue'.
Something that will take a certain amount of time.

But i'll try to fill this, currently reading about vue rendering functions.
Feel free to close this, i'll reopen it with detailed info.

commented

Alright, if you start work on this, could you open a PR, or ask me to re-open this?

Sure, thanks !

Hi ! I'm starting work on this, based on https://github.com/vuejs/babel-plugin-transform-vue-jsx/blob/master/lib/group-props.js
Should i include this file in the project somehow, with credits to the authors ?
I think it already needs adjustments to fully comply with vue's createElement.

commented

Oh cool! I think you’re fine referencing the source that you used as inspiration for some code snippets that you ported over. But it depends on how much needs to change perhaps?

Yeah, let's tell me what you think about this by looking at the real thing !
I have finished the work except for tests that i'm writing atm.
Btw remark-vue is here and probably needs a few adjustements before 1.0.
Can you reopen the issue ?
I'll make a PR now.