Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

chore(svelte): Simplify development for dotcom#63341

Merged
fkling merged 1 commit into
mainfrom
fkling/sk/simplify-dev-for-dotcom
Jun 19, 2024
Merged

chore(svelte): Simplify development for dotcom#63341
fkling merged 1 commit into
mainfrom
fkling/sk/simplify-dev-for-dotcom

Conversation

@fkling

@fkling fkling commented Jun 19, 2024

Copy link
Copy Markdown
Contributor

Whether or not the app is in "dotcom mode" is determined by window.context.sourcegraphDotComMode. In development we use a stub window.context object defined in app.html.

This commit extends that object to set sourcegraphDotComMode depending on an environment varible. The environment variable is set by using vite modes (https://vitejs.dev/guide/env-and-mode.html).

The whole setup can be started with pnpm dev:dotcom.

Test plan

Ran pnpm dev:dotcom and saw the dotcom specific header and footer.

Whether or not the app is in "dotcom mode" is determined by
`window.context.sourcegraphDotComMode`. In development we use a stub
`window.context` object defined in `app.html`.

This commit extends that object to set `sourcegraphDotComMode` depending
on an environment varible. The environment variable is set by using vite
modes (https://vitejs.dev/guide/env-and-mode.html).

The whole setup can be started with `pnpm dev:dotcom`.
@fkling fkling requested a review from camdencheek June 19, 2024 13:26
@fkling fkling self-assigned this Jun 19, 2024
@cla-bot cla-bot Bot added the cla-signed label Jun 19, 2024

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This file isn't relevant anymore.

@camdencheek camdencheek left a comment

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.

Very nice!

@fkling fkling merged commit 15ea951 into main Jun 19, 2024
@fkling fkling deleted the fkling/sk/simplify-dev-for-dotcom branch June 19, 2024 20:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants