Skip to content

Commit

Permalink
build(project): fix building docs
Browse files Browse the repository at this point in the history
  • Loading branch information
julianpoemp committed Nov 8, 2024
1 parent baed3b8 commit 1db6727
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 25 deletions.
55 changes: 35 additions & 20 deletions apps/web-components-demo/index.html
Original file line number Diff line number Diff line change
@@ -1,24 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Web Components DEMO</title>
<script type="application/javascript" src="../../dist/libs/utilities/index.umd.js"></script>
<script type="application/javascript" src="../../dist/libs/media/index.umd.js"></script>
<script type="application/javascript" src="../../dist/libs/web-media/index.umd.js"></script>
<script type="application/javascript" src="../../dist/libs/annotation/index.umd.js"></script>
<script type="application/javascript" src="../../dist/libs/web-components/web-components.js"></script>
</head>
<body>
<h2>Audioplayer</h2>
<div id="audioplayer-wrapper"></div>
<button onclick="playAudioPlayer()">PLAY</button>
<button onclick="pauseAudioPlayer()">PAUSE</button>
<head>
<meta charset="UTF-8" />
<title>Web Components DEMO</title>
<script
type="application/javascript"
src="../../dist/libs/utilities/index.umd.js"
></script>
<script
type="application/javascript"
src="../../dist/libs/media/index.umd.js"
></script>
<script
type="application/javascript"
src="../../dist/libs/web-media/index.umd.js"
></script>
<script
type="application/javascript"
src="../../dist/libs/annotation/index.umd.js"
></script>
<script
type="application/javascript"
src="../../dist/libs/web-components/web-components.js"
></script>
</head>
<body>
<h2>Audioplayer</h2>
<div id="audioplayer-wrapper"></div>
<button onclick="playAudioPlayer()">PLAY</button>
<button onclick="pauseAudioPlayer()">PAUSE</button>

<h2 style="margin-top:30px;">AudioViewer</h2>
<div id="audioviewer-wrapper"></div>
<button onclick="playAudioViewer()">PLAY</button>
<button onclick="pauseAudioViewer()">PAUSE</button>
<script type="module" src="./index.mjs"></script>
</body>
<h2 style="margin-top: 30px">AudioViewer</h2>
<div id="audioviewer-wrapper"></div>
<button onclick="playAudioViewer()">PLAY</button>
<button onclick="pauseAudioViewer()">PAUSE</button>
<script type="module" src="./index.mjs"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions libs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Objects and other classes used to handle annotation tasks
</tr>
<tr>
<td>
<a href="./ngx-components"><img alt="NPM Version" src="https://img.shields.io/npm/v/%40octra%2Fngx-components?label=ngx-components"></a>
<a href="./ngx-components/"><img alt="NPM Version" src="https://img.shields.io/npm/v/%40octra%2Fngx-components?label=ngx-components"></a>
</td>
<td>
Angular
Expand All @@ -92,7 +92,7 @@ Angular components e.g. for the signal displays
</tr>
<tr>
<td>
<a href="./ngx-utilities"><img alt="NPM Version" src="https://img.shields.io/npm/v/%40octra%2Fngx-utilities?label=ngx-utilities"></a>
<a href="./ngx-utilities/"><img alt="NPM Version" src="https://img.shields.io/npm/v/%40octra%2Fngx-utilities?label=ngx-utilities"></a>
</td>
<td>
Angular
Expand Down
6 changes: 3 additions & 3 deletions runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ const Project = {
},
prepareDocs: async function () {
let content = await fs.readFile(`./typedocs/index.html`, 'utf-8');
content = content.replace(/\.\/([^/]+)\/src\//g, (g0, g1) => {
content = content.replace(/\.\/(?!apps)([^/]+)/g, (g0, g1) => {
return `modules/_octra_${g1.replace(/-/g, '_')}.html`;
});
content = content.replace(/apps\/([^/]+)\/src\//g, (g0, g1) => {
return `modules/_octra_${g1.replace(/-/g, '_')}.html`;
content = content.replace(/".*apps\/([^/]+)/g, (g0, g1) => {
return `"modules/_octra_${g1.replace(/-/g, '_')}.html`;
});
await fs.writeFile(`./typedocs/index.html`, content, {
encoding: 'utf-8',
Expand Down

0 comments on commit 1db6727

Please sign in to comment.