-
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.
Add Linjär Algebra
- Loading branch information
Showing
7 changed files
with
52 additions
and
4 deletions.
There are no files selected for viewing
File renamed without changes.
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,8 +1,16 @@ | ||
import './app.css' | ||
import App from './App.svelte' | ||
|
||
const APP_NAME = __VITE_ENV__.APP_NAME | ||
const VERSION = __VITE_ENV__.VERSION | ||
const COMMIT_HASH = __VITE_ENV__.COMMIT_HASH | ||
const BUILD_DATE = __VITE_ENV__.BUILD_DATE | ||
|
||
console.log(`${APP_NAME} - v${VERSION}-${COMMIT_HASH.slice(0, 7)} | ||
build date: ${BUILD_DATE}`.trim()) | ||
|
||
const app = new App({ | ||
target: document.getElementById('app'), | ||
target: document.getElementById('app')!, | ||
}) | ||
|
||
export default app |
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,2 +1,13 @@ | ||
/// <reference types="svelte" /> | ||
/// <reference types="vite/client" /> | ||
|
||
declare const __VITE_ENV__ : { | ||
MODE: string | ||
APP_NAME: string | ||
VERSION: string | ||
AUTHOR: string | ||
DESCRIPTION: string | ||
HOMEPAGE: string | ||
COMMIT_HASH: string | ||
BUILD_DATE: 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,7 +1,21 @@ | ||
import { defineConfig } from 'vite' | ||
import { svelte } from '@sveltejs/vite-plugin-svelte' | ||
|
||
const env = { | ||
MODE: process.env.NODE_ENV, | ||
APP_NAME: 'Maths', | ||
VERSION: process.env.npm_package_version, | ||
AUTHOR: process.env.npm_package_author_name, | ||
DESCRIPTION: process.env.npm_package_description, | ||
HOMEPAGE: process.env.npm_package_homepage, | ||
COMMIT_HASH: process.env.GITHUB_SHA || 'development', | ||
BUILD_DATE: new Date().toISOString() | ||
} | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [svelte()], | ||
define: { | ||
__VITE_ENV__: JSON.stringify(env) | ||
} | ||
}) |