forked from nextstrain/forecasts-ncov
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates for SFA forecasting UI datasets
Adding two vizualization UI env files for use with VITE MODE (`us-states` or `wa-state`) when building. The public website currently uses both versions. Updates the URLs of the model files to reflect their current location and naming conventions, utilizing environment variables where possible.
- Loading branch information
1 parent
0fbc314
commit 31050f8
Showing
5 changed files
with
28 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# US states | ||
VITE_URL_PATH_BASE=/forecasts-ncov-us-states/ | ||
VITE_DATA_PREFIX=us_states/us_ | ||
|
||
VITE_DATA_BASE_URL=https://covidforecasting.brotmanbaty.org/data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# WA state | ||
VITE_URL_PATH_BASE=/forecasts-ncov-wa/ | ||
VITE_DATA_PREFIX=wa/wa_ | ||
|
||
VITE_DATA_BASE_URL=https://covidforecasting.brotmanbaty.org/data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
import { defineConfig } from 'vite' | ||
import {defineConfig, loadEnv} from 'vite' | ||
import react from '@vitejs/plugin-react' | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
// The base must match repo name since we are deploying the site to https://nextstrain.github.io/forecasts-ncov/ | ||
// See vite docs on deploying to GH pages: https://vitejs.dev/guide/static-deploy.html#github-pages | ||
base: "/forecasts-ncov/", | ||
plugins: [react()], | ||
export default defineConfig(({mode}) => { | ||
const env = loadEnv(mode, process.cwd(), '') | ||
return { | ||
// The base is specific to each vite MODE environment, since we are deploying to: | ||
// https://covidforecasting.brotmanbaty.org/forecasts-ncov-wa/index.html and | ||
// https://covidforecasting.brotmanbaty.org/forecasts-ncov-us-states/index.html | ||
base: env.VITE_URL_PATH_BASE, | ||
plugins: [react()], | ||
} | ||
}) |