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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: what the JS/HTML template building might look like #141

Closed
wants to merge 5 commits into from

Conversation

wegry
Copy link
Contributor

@wegry wegry commented Jun 16, 2021

I'd like for the building and loading of playgrounds to look something like this list

  • stitches a module with a default export together with a very basic playground runtime.

  • Compile JS and HTML templates once instead of per request

  • extract playground instance source from the document tree

  • map playground instance source with a content hash

  • cache playground instance builds after the first

  • Figure out a way around loading React from a CDN. For now this uses nodeLinker: node_modules.

@wegry wegry requested a review from mariuswilms June 16, 2021 00:46
@wegry wegry changed the title Rough draft of what the JS/HTML template building might look like Draft: what the JS/HTML template building might look like Jun 20, 2021
@wegry
Copy link
Contributor Author

wegry commented Jun 20, 2021

@mariuswilms I think the basic concept is outlined here. It's very rough, but the biggest thing between getting this off the ground now is, I think, the parse/rewriting in node_doc_transformer.go. Maybe you'd like to take a stab at that?

I'll confess I'm tempted to say something like https://github.com/russross/blackfriday with https://pkg.go.dev/github.com/russross/blackfriday/v2#HTMLRenderer.RenderNode changed might fit our needs.

@mariuswilms mariuswilms force-pushed the user-components branch 2 times, most recently from 1992b97 to 629149a Compare August 20, 2021 10:50
@mariuswilms mariuswilms force-pushed the user-components branch 2 times, most recently from ea9c955 to 414385b Compare August 29, 2021 17:53
@mariuswilms
Copy link
Member

mariuswilms commented Aug 29, 2021

@wegry I've rebased your changes and merged them into #139 and fitted them together with the code I've wrote. I'm closing this PR in favor of #139, let's continue our work there.

I'm commenting on that PR on the status,

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

Successfully merging this pull request may close these issues.

None yet

2 participants