Skip to content

Commit

Permalink
update snapshots, apply svelte template updates to typescript version
Browse files Browse the repository at this point in the history
  • Loading branch information
FredKSchott committed Oct 6, 2020
1 parent 9da4a08 commit 6136a0f
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 73 deletions.
132 changes: 69 additions & 63 deletions create-snowpack-app/app-template-svelte-typescript/src/App.svelte
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>

16 changes: 6 additions & 10 deletions create-snowpack-app/app-template-svelte/src/App.svelte
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
<script>
import { onMount } from 'svelte'
let count = 0
import {onMount} from 'svelte';
let count = 0;
onMount(() => {
const interval = setInterval(() => count++, 1000);
return () => {
clearInterval(interval)
}
})
const message = 'Learn Svelte';
clearInterval(interval);
};
});
</script>

<style>
Expand Down Expand Up @@ -66,7 +62,7 @@
<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}
Learn Svelte
</a>
</p>
</header>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8809,6 +8809,8 @@ exports[`create-snowpack-app app-template-svelte: web_modules/import-map.json 1`
}"
`;

exports[`create-snowpack-app app-template-svelte: web_modules/svelte.js 1`] = `"export { o as onMount } from './common/index-XXXXXXXX.js';"`;

exports[`create-snowpack-app app-template-svelte: web_modules/svelte/internal.js 1`] = `
"function noop() { }
function run(fn) {
Expand Down Expand Up @@ -9242,6 +9244,8 @@ exports[`create-snowpack-app app-template-svelte-typescript: web_modules/import-
}"
`;

exports[`create-snowpack-app app-template-svelte-typescript: web_modules/svelte.js 1`] = `"export { o as onMount } from './common/index-XXXXXXXX.js';"`;

exports[`create-snowpack-app app-template-svelte-typescript: web_modules/svelte/internal.js 1`] = `
"function noop() { }
function run(fn) {
Expand Down

1 comment on commit 6136a0f

@vercel
Copy link

@vercel vercel bot commented on 6136a0f Oct 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.