Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maybe extract mdx-to-jsx compiler into separate module? #17

Open
davidtheclark opened this issue Jun 11, 2017 · 6 comments
Open

Maybe extract mdx-to-jsx compiler into separate module? #17

davidtheclark opened this issue Jun 11, 2017 · 6 comments

Comments

@davidtheclark
Copy link

馃憢 Thanks for publishing this module!

I think the core functionality here of聽compiling Markdown-with-JSX to pure JSX has a broader range of uses than just this Webpack loader. I have a few other experiments I'd like to try it in. Do you have any interest in extracting that logic to another module?

(If so, I'd be interested in helping out!)

@davidtheclark davidtheclark changed the title Maybe extract string compiler into separate module? Maybe extract mdx-to-jsx compiler into separate module? Jun 11, 2017
@ticky
Copy link
Owner

ticky commented Jun 11, 2017

Hi David,

I think that totally makes sense! If I were to do this again I think I鈥檇 break it up a bit more.

I鈥檇 be interested in breaking it up! I鈥檓 not sure what the best way to do so would be. Possibly two PRs, one which cuts this down to the processing logic and gets published to this repo (which is then moved!), and another which gets published to a new repo under this name which wraps the other as a Markdown loader.

That said, I know I still need to land #8, and splitting this up seems like it鈥檒l wreak havoc when it comes to merging that. I might have another look at what鈥檚 left to fix on that soon.

If you wanted to take a look at one or both of those new PRs, I can help orchestrate the move! :)

@davidtheclark
Copy link
Author

I'd love to help with both creating a new repo/package and updating this one to use it. Your 2 PR plan sounds right to me.

Regarding #8 ... we could merge it first or just port those changes to the new repo, whatever you prefer. I'll take a look at it and chime in over there.

@davidtheclark
Copy link
Author

@tricky: To get a headstart on understanding the issues I started https://github.com/davidtheclark/md-jsx-transform. I found that as long as I kept delimiters around all expressions, the code could stay very simple. (Even {{|}} seemed to work smoothly, with the help of balanced-match.)

If you have the time and interest, would you mind looking at that implementation and seeing if you think it's missing anything vital that you've discovered in working this module? I understand the delimiter requirement might bug you, but I wonder if the simplicity of the code makes up for that? Curious what you think 馃

@ticky
Copy link
Owner

ticky commented Jun 23, 2017

@davidtheclark hi, I don鈥檛 seem to be able to see anything at that URL? Is it private?

@davidtheclark
Copy link
Author

@tricky: I gave the project a more stupid name for kicks and moved it into my company's org https://github.com/mapbox/jsxtreme-markdown. Also a Webpack loader and a Babel plugin that utilize it. Been working on it for immediate workplace needs 馃槵

@ticky
Copy link
Owner

ticky commented Sep 21, 2017

I鈥檝e made some progress on this in #8, the processing functionality is its own separate file from the Webpack interop. I plan to split it up altogether eventually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants