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

feat: Add singleFile param to generate everything in one index.html #62

Merged
merged 4 commits into from
Sep 11, 2020

Conversation

GordeevArt
Copy link
Contributor

Add singleFile param to output all in one html file

Resolves #61

Add singleFile param to output all in
one html file

asyncapi#61
@derberg derberg changed the title Feat/single file/61 feat: Add singleFile param to generate everything in one index.html Sep 11, 2020
@derberg
Copy link
Member

derberg commented Sep 11, 2020

@GordeevArt Thanks a lot for this PR! Could you explain why there are changes to template/js/highlight.min.js , did you do some updates to it?

@GordeevArt
Copy link
Contributor Author

@derberg I replace "</script>" with "<" + "/script>" as workaround for escaping in html. It is not a good way. If you know better way please let me know.

@derberg
Copy link
Member

derberg commented Sep 11, 2020

@GordeevArt sorry but could you somehow show to me what happens if you do not have this change?

If we change it directly in highlight.min.js the risk is that later, when someone updates it with the latest https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/highlight.min.js, your change will easily get lost

@GordeevArt
Copy link
Contributor Author

@derberg error in browser's console, not clickable example's buttons and something terrible with component's messages.

image

image

image

@derberg
Copy link
Member

derberg commented Sep 11, 2020

@GordeevArt Thanks for your explanation. I just checked and looks like with latest highlight.js the problem is not there so please just update the entire file with the latest one

@GordeevArt
Copy link
Contributor Author

@derberg yes. There is no problem with the latest versuib of highlight.js

update to the Highlight.js 10.2.0
without dirty hacks

asyncapi#61
@derberg
Copy link
Member

derberg commented Sep 11, 2020

@GordeevArt I tested it locally, works like a charm. Thanks a lot for a great contribution!

@derberg derberg merged commit d891c5d into asyncapi:master Sep 11, 2020
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 0.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@GordeevArt GordeevArt deleted the feat/single-file/61 branch September 11, 2020 13:21
@derberg
Copy link
Member

derberg commented Sep 11, 2020

@all-contributors please add @GordeevArt for code

@allcontributors
Copy link
Contributor

@derberg

I've put up a pull request to add @GordeevArt! 🎉

@derberg
Copy link
Member

derberg commented Sep 11, 2020

@GordeevArt feel free to join us on our slack https://www.asyncapi.com/slack-invite/

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

Successfully merging this pull request may close these issues.

Add parameter singleFile
3 participants