Skip to content

Commit 862899b

Browse files
Update example to use npm package.
1 parent 24bf1d6 commit 862899b

File tree

3 files changed

+18
-26
lines changed

3 files changed

+18
-26
lines changed

example/package-lock.json

Lines changed: 15 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"dependencies": {
1515
"compression": "^1.7.1",
1616
"polka": "^0.5.0",
17-
"sirv": "^0.4.0"
17+
"sirv": "^0.4.0",
18+
"svelte-codemirror": "^1.0.0"
1819
},
1920
"devDependencies": {
2021
"npm-run-all": "^4.1.5",

example/src/routes/index.svelte

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,9 @@
11
<script>
2-
import CodeMirror from "../../../src/CodeMirror.svelte";
2+
import CodeMirror from "svelte-codemirror/src/CodeMirror.svelte";
33
</script>
44

55
<style>
6-
h1,
7-
figure,
8-
p {
9-
text-align: center;
10-
margin: 0 auto;
11-
}
126
13-
h1 {
14-
font-size: 2.8em;
15-
text-transform: uppercase;
16-
font-weight: 700;
17-
margin: 0 0 0.5em 0;
18-
}
19-
20-
p {
21-
margin: 1em auto;
22-
}
23-
24-
@media (min-width: 480px) {
25-
h1 {
26-
font-size: 4em;
27-
}
28-
}
297
</style>
308

319
<svelte:head>

0 commit comments

Comments
 (0)