-
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.
- Loading branch information
1 parent
cd63e6e
commit da80b03
Showing
1 changed file
with
20 additions
and
0 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,20 @@ | ||
import { dev } from '$app/environment'; | ||
import api from '$endpoints'; | ||
import consts from '$lib/consts'; | ||
|
||
function helloWorld() { | ||
console.log(`%c${consts.APP_NAME}\n`, 'font-size: 3rem'); | ||
console.log(`%cMade with <3 by ${consts.APP_AUTHOR[0]}`, 'font-size: 1.5rem'); | ||
console.log(`Check out the code on\n${consts.APP_GITHUB}`); | ||
} | ||
|
||
export const init = () => { | ||
helloWorld(); | ||
// In dev mode, attach the `endpoints` to the console | ||
if (dev) { | ||
// @ts-expect-error: Global variables are usually an anti-pattern, but this is very useful for | ||
// debugging, and so it is done in dev mode. | ||
globalThis.api = api(); | ||
} | ||
} | ||
|