This repository has been archived by the owner on Nov 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use config files instead of hardcoded vars
- Loading branch information
Showing
9 changed files
with
48 additions
and
41 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
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
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,12 @@ | ||
import React from 'react' | ||
import ReactDOM from 'react-dom/client' | ||
import App from './App.tsx' | ||
import './index.css' | ||
import React from "react"; | ||
import ReactDOM from "react-dom/client"; | ||
import App from "./App.tsx"; | ||
import "./index.css"; | ||
|
||
ReactDOM.createRoot(document.getElementById('root')!).render( | ||
document.title = `wasmGBA v${WASMGBA_VERSION}-${import.meta.env.MODE}`; | ||
|
||
ReactDOM.createRoot(document.getElementById("root")!).render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode>, | ||
) | ||
</React.StrictMode> | ||
); |
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 +1,5 @@ | ||
/// <reference types="vite/client" /> | ||
declare const WASMGBA_VERSION: string; | ||
declare const WASMGBA_REPO_URL: string; | ||
declare const WASMGBA_OSS_LICENSES_URL: string; | ||
declare const MGBA_UPSTREAM_REPO_URL: string; |
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,13 +1,23 @@ | ||
import path from "path" | ||
import react from "@vitejs/plugin-react-swc" | ||
import { defineConfig } from "vite" | ||
import path from "path"; | ||
import react from "@vitejs/plugin-react-swc"; | ||
import { defineConfig } from "vite"; | ||
|
||
export default defineConfig({ | ||
base: '/wasmGBA/', | ||
base: "/wasmGBA/", | ||
plugins: [react()], | ||
resolve: { | ||
alias: { | ||
"@": path.resolve(__dirname, "./src"), | ||
}, | ||
}, | ||
}) | ||
define: { | ||
WASMGBA_VERSION: JSON.stringify(process.env.npm_package_version), | ||
WASMGBA_REPO_URL: JSON.stringify(process.env.npm_package_repository_url), | ||
WASMGBA_OSS_LICENSES_URL: JSON.stringify( | ||
`${process.env.npm_package_repository_url}#Dependencies` | ||
), | ||
MGBA_UPSTREAM_REPO_URL: JSON.stringify( | ||
"https://github.com/thenick775/mgba/tree/c3d5ca5d5ffd47b2866fe6e40a7d551d845e512a" | ||
), | ||
}, | ||
}); |