-
Notifications
You must be signed in to change notification settings - Fork 915
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update snapshots, apply svelte template updates to typescript version
- Loading branch information
1 parent
9da4a08
commit 6136a0f
Showing
3 changed files
with
79 additions
and
73 deletions.
There are no files selected for viewing
132 changes: 69 additions & 63 deletions
132
create-snowpack-app/app-template-svelte-typescript/src/App.svelte
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,64 +1,70 @@ | ||
<script> | ||
$: count = 0; | ||
setInterval(() => count++, 1000); | ||
const message: string = 'Learn Svelte'; | ||
</script> | ||
|
||
<style> | ||
:global(body) { | ||
margin: 0; | ||
font-family: Arial, Helvetica, sans-serif; | ||
} | ||
.App { | ||
text-align: center; | ||
} | ||
.App code { | ||
background: #0002; | ||
padding: 4px 8px; | ||
border-radius: 4px; | ||
} | ||
.App p { | ||
margin: 0.4rem; | ||
} | ||
.App-header { | ||
background-color: #f9f6f6; | ||
color: #333; | ||
min-height: 100vh; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
font-size: calc(10px + 2vmin); | ||
} | ||
.App-link { | ||
color: #ff3e00; | ||
} | ||
.App-logo { | ||
height: 36vmin; | ||
pointer-events: none; | ||
margin-bottom: 3rem; | ||
animation: App-logo-spin infinite 1.6s ease-in-out alternate; | ||
} | ||
@keyframes App-logo-spin { | ||
from { | ||
transform: scale(1); | ||
} | ||
to { | ||
transform: scale(1.06); | ||
} | ||
} | ||
</style> | ||
|
||
<div class="App"> | ||
<header class="App-header"> | ||
<img src="/logo.svg" class="App-logo" alt="logo" /> | ||
<p>Edit <code>src/App.svelte</code> and save to reload.</p> | ||
<p>Page has been open for <code>{count}</code> seconds.</p> | ||
<p> | ||
<a class="App-link" href="https://svelte.dev" target="_blank" rel="noopener noreferrer"> | ||
{message} | ||
</a> | ||
</p> | ||
</header> | ||
</div> | ||
import {onMount} from 'svelte'; | ||
let count: number = 0; | ||
onMount(() => { | ||
const interval = setInterval(() => count++, 1000); | ||
return () => { | ||
clearInterval(interval); | ||
}; | ||
}); | ||
</script> | ||
|
||
<style> | ||
:global(body) { | ||
margin: 0; | ||
font-family: Arial, Helvetica, sans-serif; | ||
} | ||
.App { | ||
text-align: center; | ||
} | ||
.App code { | ||
background: #0002; | ||
padding: 4px 8px; | ||
border-radius: 4px; | ||
} | ||
.App p { | ||
margin: 0.4rem; | ||
} | ||
.App-header { | ||
background-color: #f9f6f6; | ||
color: #333; | ||
min-height: 100vh; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
font-size: calc(10px + 2vmin); | ||
} | ||
.App-link { | ||
color: #ff3e00; | ||
} | ||
.App-logo { | ||
height: 36vmin; | ||
pointer-events: none; | ||
margin-bottom: 3rem; | ||
animation: App-logo-spin infinite 1.6s ease-in-out alternate; | ||
} | ||
@keyframes App-logo-spin { | ||
from { | ||
transform: scale(1); | ||
} | ||
to { | ||
transform: scale(1.06); | ||
} | ||
} | ||
</style> | ||
|
||
<div class="App"> | ||
<header class="App-header"> | ||
<img src="/logo.svg" class="App-logo" alt="logo" /> | ||
<p>Edit <code>src/App.svelte</code> and save to reload.</p> | ||
<p>Page has been open for <code>{count}</code> seconds.</p> | ||
<p> | ||
<a class="App-link" href="https://svelte.dev" target="_blank" rel="noopener noreferrer"> | ||
Learn Svelte | ||
</a> | ||
</p> | ||
</header> | ||
</div> | ||
|
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
6136a0f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: