Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
"types": "tsc --build",
"watch:types": "tsc --build --watch --preserveWatchOutput",
"build": "run-s build:necessary types build:packages build:apps",
"build:apps": "lerna run --scope=@deephaven/{code-studio,embed-widget} build",
"build:apps": "lerna run --scope=@deephaven/{code-studio,embed-chart,embed-grid,embed-widget} build",
"build:app": "lerna run --scope=@deephaven/code-studio build",
"build:embed-widget": "lerna run --scope=@deephaven/embed-widget build",
"build:packages": "lerna run --ignore=@deephaven/{code-studio,embed-widget} build --stream",
"build:packages": "lerna run --ignore=@deephaven/{code-studio,embed-chart,embed-grid,embed-widget} build --stream",
"build:profile": "lerna run build --stream --profile",
"build:necessary": "lerna run build --scope=@deephaven/icons",
"analyze": "lerna run analyze",
Expand Down
1 change: 0 additions & 1 deletion packages/embed-chart/.gitignore

This file was deleted.

13 changes: 0 additions & 13 deletions packages/embed-chart/build/index.html

This file was deleted.

16 changes: 16 additions & 0 deletions packages/embed-chart/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!doctype html>
<html lang="en">
<head>
<base href="./" />
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>

<script>
// Can't be an HTML meta redirect because we need to keep the search params
const url = new URL('../../iframe/widget/', document.baseURI);
url.search = window.location.search;
window.location.replace(url);
</script>
</body>
</html>
3 changes: 3 additions & 0 deletions packages/embed-chart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"directory": "packages/embed-chart"
},
"homepage": ".",
"scripts": {
"build": "vite build --outDir build"
},
"files": [
"build"
],
Expand Down
1 change: 0 additions & 1 deletion packages/embed-grid/.gitignore

This file was deleted.

13 changes: 0 additions & 13 deletions packages/embed-grid/build/index.html

This file was deleted.

16 changes: 16 additions & 0 deletions packages/embed-grid/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!doctype html>
<html lang="en">
<head>
<base href="./" />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should still be BASE_URL.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just trying to make this simple (using Vite default config). I don't see any reason BASE_URL needs to be easily changeable at build time as we don't support anything other than ./

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea fair

</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>

<script>
// Can't be an HTML meta redirect because we need to keep the search params
const url = new URL('../../iframe/widget/', document.baseURI);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May as well just do ../widget ...

Suggested change
const url = new URL('../../iframe/widget/', document.baseURI);
const url = new URL('../widget/', document.baseURI);

We could have env vars that you set when building to reference where the new iframe path should be, but this is fine... if you change the path, you'll need to rewrite the path in this index.html file.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya I figured these were simple enough redirects that adding an env file just adds an unnecessary layer of pass through. Not any gain IMO when we're replacing a single use value with a single use variable instead and we're ultimately trying to remove these separate embed packages

url.search = window.location.search;
window.location.replace(url);
</script>
</body>
</html>
3 changes: 3 additions & 0 deletions packages/embed-grid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"directory": "packages/embed-grid"
},
"homepage": ".",
"scripts": {
"build": "vite build --outDir build"
},
"files": [
"build"
],
Expand Down