Skip to content

Commit

Permalink
chore: update html-template
Browse files Browse the repository at this point in the history
  • Loading branch information
etowahadams committed Oct 6, 2023
1 parent 5586b72 commit ed8caa7
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions editor/html-template.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,18 @@
import { version as goslingVersion } from '../package.json';
const higlassVersion = '1.12';
const reactVersion = '17';
const pixiVersion = '6';
import { version as higlassVersion } from 'higlass/package.json';

export const getHtmlTemplate = (spec: string) => `
<!DOCTYPE html>
<html>
<head>
<title>Gosling Visualization</title>
<link rel="stylesheet" href="https://esm.sh/higlass@${higlassVersion}/dist/hglib.css">
<script type="importmap">
{
"imports": {
"react": "https://esm.sh/react@${reactVersion}?bundle",
"react-dom": "https://esm.sh/react-dom@${reactVersion}?bundle",
"pixi.js": "https://esm.sh/pixi.js@${pixiVersion}?bundle",
"higlass": "https://esm.sh/higlass@${higlassVersion}?bundle",
"gosling.js": "https://esm.sh/gosling.js@${goslingVersion}?bundle"
}
}
</script>
</head>
<body>
<div id="gosling-container"></div>
<script type="module">
import { embed } from 'gosling.js';
import { embed } from 'https://esm.sh/gosling.js@${goslingVersion}?bundle';
embed(document.getElementById('gosling-container'), ${spec})
</script>
</body>
Expand Down

0 comments on commit ed8caa7

Please sign in to comment.