Skip to content
Snippets Groups Projects
Commit 5afea744 authored by Benedikt's avatar Benedikt
Browse files

now using the bundled js instead of unbundled preparation for cdn delivery

parent 9680a693
No related branches found
No related tags found
No related merge requests found
Pipeline #51877 passed
...@@ -4,3 +4,5 @@ dcc-viewer/node_modules/ ...@@ -4,3 +4,5 @@ dcc-viewer/node_modules/
node_modules/ node_modules/
coverage/ coverage/
dist/
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
xsi:schemaLocation="https://ptb.de/dcc https://gitlab1.ptb.de/digitaldynamicmeasurement/dccanddsischemawithoutdepricatedelements/-/raw/main/dcc.xsd" xsi:schemaLocation="https://ptb.de/dcc https://gitlab1.ptb.de/digitaldynamicmeasurement/dccanddsischemawithoutdepricatedelements/-/raw/main/dcc.xsd"
schemaVersion="3.3.0"> schemaVersion="3.3.0">
<!-- Embedded XSLT stylesheet --> <!-- Embedded XSLT stylesheet for production -->
<xsl:stylesheet id="embeddedXSL" version="1.0" <xsl:stylesheet id="embeddedXSL" version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"> xmlns:exsl="http://exslt.org/common">
...@@ -19,21 +19,24 @@ ...@@ -19,21 +19,24 @@
<head> <head>
<meta charset="UTF-8"/> <meta charset="UTF-8"/>
<title>DCC Viewer</title> <title>DCC Viewer</title>
<!-- Link to production CSS -->
<link rel="stylesheet" type="text/css" href="http://141.25.102.20:5173/dist/style.css"/> <link rel="stylesheet" type="text/css" href="http://141.25.102.20:5173/dist/style.css"/>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
<!-- Output the entire XML into a hidden script block as plain text --> <!-- Output the certificate XML into a hidden script block -->
<script id="xmlContent" type="application/xml"> <script id="xmlContent" type="application/xml">
<xsl:copy-of select="dcc:digitalCalibrationCertificate"/> <xsl:copy-of select="dcc:digitalCalibrationCertificate"/>
</script> </script>
<!-- Load the production bundle and initialize the app --> <!-- Load the production bundle and initialize the app -->
<script type="module"> <script type="module">
<![CDATA[import { init } from 'http://localhost:5173/src/app.js'; <![CDATA[
const xmlNode = document.getElementById('xmlContent').firstChild; import { init } from 'http://141.25.102.20:5173/dist/dccviewer-js.es.js';
const xmlStr = new XMLSerializer().serializeToString(xmlNode); const xmlNode = document.getElementById('xmlContent').firstChild;
console.log('Serialized XML:', xmlStr); const xmlStr = new XMLSerializer().serializeToString(xmlNode);
init(xmlStr, { containerId: 'app', language: 'en' });]]> console.log('Serialized XML:', xmlStr);
init(xmlStr, { containerId: 'app', language: 'en' });
]]>
</script> </script>
</body> </body>
</html> </html>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment