-
Notifications
You must be signed in to change notification settings - Fork 297
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
bd83ffa
commit eedae70
Showing
18 changed files
with
51 additions
and
243 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,11 @@ | ||
<div> | ||
<h1>{title}</h1> | ||
|
||
<h4>Grid</h4> | ||
<Grid></Grid> | ||
<h1>{title}</h1> | ||
|
||
<h4>Treeview</h4> | ||
<Treeview locations='{locations}'></Treeview> | ||
<h4>Friends</h4> | ||
<Friends></Friends> | ||
</div> | ||
|
||
<h4>Friends</h4> | ||
<Friends></Friends> | ||
</div> | ||
|
||
<script> | ||
import Grid from './grid/grid'; | ||
import Treeview from './treeview/treeview'; | ||
import Friends from './friends/friends' | ||
|
||
import { LocationService } from './treeview/location-service'; | ||
|
||
let locationService = new LocationService(); | ||
let locations = locationService.getLocations(); | ||
|
||
export default { | ||
data () { | ||
return { | ||
title: 'Svelte', | ||
locations: locations | ||
} | ||
}, | ||
|
||
components: { | ||
Treeview, | ||
Grid, | ||
Friends | ||
} | ||
}; | ||
</script> | ||
<script> | ||
import Friends from './friends/Friends.svelte'; | ||
let title = 'Svelte'; | ||
</script> |
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,29 +1,19 @@ | ||
package(default_visibility = ["//visibility:public"]) | ||
load("@build_bazel_rules_svelte//:defs.bzl", "svelte", "bundle_dev") | ||
load("@io_bazel_rules_sass//sass:sass.bzl", "sass_binary") | ||
|
||
svelte( | ||
name = "app", | ||
name = "App", | ||
srcs = ["main.js"], | ||
entry_point = "App.html", | ||
deps = ["//src/apps/svelte-demo/treeview", | ||
"//src/apps/svelte-demo/grid", | ||
"//src/apps/svelte-demo/friends" | ||
] | ||
) | ||
sass_binary( | ||
name = "styles", | ||
src = "app.scss", | ||
deps = [ | ||
"//src/apps/svelte-demo/styles" | ||
"//src/apps/svelte-demo/friends:Friends" | ||
] | ||
) | ||
|
||
bundle_dev( | ||
name = "bundle_svelte", | ||
entry_point = "main.js", | ||
deps = [ | ||
":app", | ||
":styles" | ||
":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
This file was deleted.
Oops, something went wrong.
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,9 @@ | ||
<div> | ||
<div class="friend"> | ||
{friend} | ||
</div> | ||
</div> | ||
|
||
<script> | ||
export let friend; | ||
</script> |
This file was deleted.
Oops, something went wrong.
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,17 @@ | ||
<div> | ||
{#each friends as f} | ||
<Friend friend="{f}"></Friend> | ||
{/each} | ||
</div> | ||
<script> | ||
import {onMount} from 'svelte'; | ||
import {FriendsService} from './friends-service'; | ||
import Friend from './Friend.svelte'; | ||
let friendsService = new FriendsService(); | ||
let friends = []; | ||
onMount(async () => { | ||
friends = await friendsService.getFriends(); | ||
}); | ||
</script> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,5 +1,7 @@ | ||
import App from './app'; | ||
import App from './App.svelte'; | ||
|
||
var demoApp = new App({ | ||
target: document.querySelector( 'main' ) | ||
}); | ||
target: document.querySelector('main'), | ||
}); | ||
|
||
export default demoApp; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.