Skip to content

Commit afe1091

Browse files
author
lenntil
committed
Format README.md
1 parent 0e0ad7d commit afe1091

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

README.md

+2-7
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ npm i -D @types/elm
3232
<script src="/elm/sample.js"></script>
3333
</svelte:head>
3434
<div bind:this="{elmRoot}" />
35-
3635
```
3736

3837
## Method 2. Using [vite-plugin-elm](https://github.com/hmsk/vite-plugin-elm):
@@ -57,7 +56,6 @@ import { plugin as elm } from "vite-plugin-elm";
5756
export default defineConfig({
5857
plugins: [sveltekit(), elm()],
5958
});
60-
6159
```
6260

6361
4. Modify `+page.svelte` to embed `Main.elm`:
@@ -76,7 +74,6 @@ export default defineConfig({
7674
</script>
7775
7876
<div bind:this="{elmRoot}" />
79-
8077
```
8178

8279
## Method 1 deep-dive. Embedding multiple Elm modules with script lifecycle management
@@ -155,10 +152,10 @@ File `Elm.svelte`:
155152
</script>
156153
157154
<div bind:this={elmRoot} />
158-
159155
```
160156

161157
### Build and [minify](https://guide.elm-lang.org/optimization/asset_size) `.elm` files
158+
162159
File `elm-build.sh`:
163160

164161
```sh
@@ -203,7 +200,6 @@ if [ "$1" = "1" ]; then
203200
elif [ "$1" = "2" ]; then
204201
build_example2
205202
fi
206-
207203
```
208204

209205
### Example 1. Using one `elm.js` file containing multiple modules
@@ -233,7 +229,6 @@ File: `one-elm-js/+page.svelte`:
233229
{/each}
234230
{/each}
235231
</section>
236-
237232
```
238233

239234
### Example 2. Using multiple `moduleName.js` files each containing one
@@ -260,12 +255,12 @@ File: `js-per-module/+page.svelte`:
260255
{/each}
261256
{/each}
262257
</div>
263-
264258
```
265259

266260
## See also
267261

268262
- [joakin/elm-node: Run Elm + JS programs easily in node](https://github.com/joakin/elm-node)
263+
269264
## Reference
270265

271266
- [JavaScript Interop · An Introduction to Elm](https://guide.elm-lang.org/interop/)

0 commit comments

Comments
 (0)