diff --git a/example/App.svelte b/example/App.svelte index cbe30c3..05aa860 100644 --- a/example/App.svelte +++ b/example/App.svelte @@ -29,7 +29,7 @@ } - + diff --git a/package.json b/package.json index ffd9bac..a6e2aae 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "svelte-javascript-tutorials", - "svelte": "src/Tutorials.svelte", + "name": "javascript-repl", + "svelte": "src/Repl.svelte", "module": "index.mjs", - "version": "0.1.2", + "version": "0.2.0", "description": "", "main": "index.js", "author": "Mila Frerichs ", diff --git a/rollup.config.js b/rollup.config.js index 9dd97bf..9dcc7f7 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -10,7 +10,7 @@ const name = pkg.name .replace(/-\w/g, m => m[1].toUpperCase()); export default { - input: 'src/Tutorials.svelte', + input: 'src/Repl.svelte', output: [ { file: pkg.module, 'format': 'es' }, { file: pkg.main, 'format': 'umd', name } diff --git a/src/Repl.svelte b/src/Repl.svelte new file mode 100644 index 0000000..a41f609 --- /dev/null +++ b/src/Repl.svelte @@ -0,0 +1,135 @@ + + + + +
+
+ {#if !viewOnly } +
+
+ {#each files as { name }, i} +
+ {name} +
+ {/each} +
+ +
+ {/if} +
+
+
+ Result +
+
+ Console +
+
+
+
+ +
+
+ +
+
+
+
+
diff --git a/src/Tutorials.svelte b/src/Tutorials.svelte deleted file mode 100644 index 2ab6525..0000000 --- a/src/Tutorials.svelte +++ /dev/null @@ -1,223 +0,0 @@ - - - - -
-
-
{chapter.title}
-
- {#if currentChapter > 0 } - - {/if} - {#each chapters as c, i} -
{c.title}
- {/each} - {#if currentChapter < (chapters.length-1) } - - {/if} -
-
-
-
- {@html chapter.content} -
-
- {#if !chapter.viewOnly } - - {/if} - {#if currentChapter < (chapters.length-1) } - - {/if} - {#if currentChapter > 0 } - - {/if} -
-
-
- -
-
- {#if !chapter.viewOnly } -
-
-
- index.js -
- -
- -
- {/if} -
-
-
- Result -
-
- Console -
-
-
-
- -
-
- -
-
-
-
-
-
- {#each chapters as c, i} -
- {/each} -
-
-