Skip to content

Commit

Permalink
Reorganize files
Browse files Browse the repository at this point in the history
  • Loading branch information
lahmatiy committed Oct 28, 2024
1 parent 24ba564 commit a0f98d5
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
3 changes: 2 additions & 1 deletion scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ async function build(browser) {
await esbuild.build({
entryPoints: [
{ in: path.join(indir, 'content-script.js'), out: 'content-script' },
path.join(indir, 'sandbox.js')
{ in: path.join(indir, 'discovery/index.js'), out: 'discovery' },
{ in: path.join(indir, 'discovery/index.css'), out: 'discovery' }
],
format: 'esm',
bundle: true,
Expand Down
File renamed without changes.
3 changes: 1 addition & 2 deletions src/discovery/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import './discovery.css';
import { version } from '../../package.json';
import { App } from '@discoveryjs/discovery';
import joraHelpers from './jora-helpers';
Expand All @@ -11,7 +10,7 @@ import * as pages from './pages';
*/
export function initDiscovery() {
const discovery = new App({
styles: [{ type: 'link', href: 'sandbox.css' }],
styles: [{ type: 'link', href: 'discovery.css' }],
embed: true,
inspector: true,
darkmodePersistent: true,
Expand Down
3 changes: 2 additions & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
{
"resources": [
"sandbox.html",
"sandbox.js",
"discovery.js",
"discovery.css",
"icons/*",
"assets/*"
],
Expand Down
6 changes: 5 additions & 1 deletion src/sandbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
</style>
<body>
<script>parent.postMessage('json-discovery-sandbox-scripts-work', '*');</script>
<script src="sandbox.js"></script>
<script type="module">
import { initDiscovery } from './discovery.js';

initDiscovery();
</script>
</body>
</html>
3 changes: 0 additions & 3 deletions src/sandbox.js

This file was deleted.

0 comments on commit a0f98d5

Please sign in to comment.