You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<palign="center">A Cybernetical compiler for svelte applications in deno (Snel = fast in Nederlands) </p>
5
+
<palign="center">A Cybernetical tool for svelte applications on deno in deno (Snel = fast in Nederlands) </p>
6
6
</p>
7
7
8
8
<palign="center">
@@ -25,54 +25,25 @@
25
25
26
26
## What is Snel?
27
27
28
-
It is a `tool/framework` to compile .svelte component to javascript files to create web application using deno and svelte
28
+
It is a `tool/framework` to compile .svelte component to javascript files to create web application using deno, vite and svelte
29
29
30
30
## Main features
31
31
32
32
- simple setup
33
33
- quick compilation
34
34
- hot reloading
35
-
-[import maps](https://github.com/WICG/import-maps) support
36
-
- support for scss and less out of the box
35
+
-[import maps](https://github.com/WICG/import-maps) support (WIP)
36
+
- support for scss and less out of the box (WIP)
37
37
- support for typescript
38
-
-[SSG](docs/ssg.md) (experimental)
39
-
- SSR (soon)
38
+
-[SSG](docs/ssg.md) (WIP)
39
+
- SSR (WIP)
40
40
41
41
## What do I need to start using Snel?
42
42
43
43
the only thing you need is to run the installation command.
44
44
45
45
```console
46
-
deno run --allow-run --allow-read https://deno.land/x/snel/install.ts
47
-
```
48
-
49
-
> wait wait! Why should I run a script instead of using deno install to install Snel?
50
-
51
-
Snel uses several tools to create a better development experience, some of these tools are:
52
-
53
-
-[**trex**](https://github.com/crewdevio/Trex) to handle scripts and compilation in watch mode.
54
-
-[**bundler**](https://deno.land/x/bundler) minify and package all files for production
55
-
56
-
the [install.ts](https://github.com/crewdevio/Snel/blob/main/install.ts) file is responsible for installing all these tools so that you only worry about creating your application.
57
-
58
-
if you not want install snel, you can execute it using [trex](https://deno.land/x/trex)
59
-
60
-
```console
61
-
trex exec snel create [project name]
62
-
```
63
-
64
-
> **note**: if you decide use snel using trex exec you need to change this scripts inside run.json file
65
-
66
-
```javascript
67
-
{
68
-
"scripts": {
69
-
"start":"trex exec snel serve",
70
-
"build":"trex exec snel build"
71
-
},
72
-
"files": [
73
-
"./src"
74
-
]
75
-
}
46
+
deno install -A -n snel https://deno.land/x/snel/install.ts
76
47
```
77
48
78
49
## how to create a project with Snel?
@@ -88,7 +59,7 @@ then you just have to enter the created project and start the development server
88
59
```console
89
60
cd ./[project name]
90
61
91
-
trex run start
62
+
deno task start
92
63
```
93
64
94
65
this starts your application on a development server in the port you entered in the configuration
@@ -440,36 +411,41 @@ create a `404.html` file:
440
411
441
412
and in your `index.html` add this:
442
413
443
-
444
414
```html
445
415
<!DOCTYPE html>
446
416
<html lang="en">
447
-
<head>
448
-
<meta charset="utf-8" />
449
-
<title>....</title>
450
-
<style type="text/css">
451
-
body:before {
452
-
content: attr(message);
453
-
}
454
-
</style>
455
-
</head>
456
-
<body>
457
-
.....
458
-
<script>
459
-
(() => {
460
-
const redirect = sessionStorage.redirect;
461
-
delete sessionStorage.redirect;
462
-
if (redirect && redirect !== location.href) {
463
-
history.replaceState(null, null, redirect);
464
-
// REMOVE THIS - just showing the redirect route in the UI
465
-
document.body.setAttribute('message', 'This page was redirected by 404.html, from the route: ' + redirect);
466
-
} else {
467
-
// REMOVE THIS - just showing the redirect route in the UI
468
-
document.body.setAttribute('message', 'This page was loaded directly from the index.html file');
417
+
<head>
418
+
<meta charset="utf-8" />
419
+
<title>....</title>
420
+
<style type="text/css">
421
+
body:before {
422
+
content: attr(message);
469
423
}
470
-
})();
471
-
</script>
472
-
</body>
424
+
</style>
425
+
</head>
426
+
<body>
427
+
.....
428
+
<script>
429
+
(() => {
430
+
const redirect = sessionStorage.redirect;
431
+
delete sessionStorage.redirect;
432
+
if (redirect && redirect !== location.href) {
433
+
history.replaceState(null, null, redirect);
434
+
// REMOVE THIS - just showing the redirect route in the UI
435
+
document.body.setAttribute(
436
+
"message",
437
+
"This page was redirected by 404.html, from the route: " + redirect
438
+
);
439
+
} else {
440
+
// REMOVE THIS - just showing the redirect route in the UI
441
+
document.body.setAttribute(
442
+
"message",
443
+
"This page was loaded directly from the index.html file"
0 commit comments