Skip to content

Commit

Permalink
inline schema if singleFile is set
Browse files Browse the repository at this point in the history
  • Loading branch information
mwiesenbauer committed Oct 14, 2024
1 parent 8599967 commit f038b9d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ export function Index({ asyncapi, params = {} }) {
if(params.baseHref) {
basehref = `<base href="${params.baseHref}">`;
}
let appJs = `<script type="application/javascript" src="js/app.js"></script>`;
if(params?.singleFile) {
appJs = `<script>${App({asyncapi, params})}</script>`;
}
return (`<!DOCTYPE html>
<html lang="en">
<head>
Expand All @@ -42,7 +46,7 @@ export function Index({ asyncapi, params = {} }) {
${asyncapiScript}
<script type="application/javascript" src="js/app.js"></script>
${appJs}
</body>
</html>`
);
Expand Down

0 comments on commit f038b9d

Please sign in to comment.