@yannosay/sinth 0.5.4 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +113 -32
- package/package.json +43 -43
- package/src/sinth.ts +276 -263
package/README.md
CHANGED
|
@@ -1,33 +1,114 @@
|
|
|
1
|
-
# Sinth
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
*
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
1
|
+
# Sinth
|
|
2
|
+
|
|
3
|
+
The language that fixes HTML. Declarative. Reactive. Compiles to pure HTML.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
## Why Sinth?
|
|
8
|
+
|
|
9
|
+
#### Reactive forms in one line.
|
|
10
|
+
```
|
|
11
|
+
Input(bind: userName, placeholder: "Enter your name")
|
|
12
|
+
Paragraph { "Hello, " + userName }
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
No useState. No onChange. No e.target.value. Just bind.
|
|
16
|
+
|
|
17
|
+
#### Logic and UI live together.
|
|
18
|
+
```TS
|
|
19
|
+
if user.isAdmin {
|
|
20
|
+
Button(onClick: "deletePost()") { "Delete" }
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
No JSX ternaries. No v-if. No separate script tags. Mixed logic. Clean.
|
|
25
|
+
|
|
26
|
+
#### Animations that make sense.
|
|
27
|
+
```ts
|
|
28
|
+
for item, index in items {
|
|
29
|
+
Paragraph(delay: index * 300) { item.name }
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Staggered animations. One expression. No useEffect. No setTimeout chains.
|
|
34
|
+
|
|
35
|
+
#### Compiles to pure HTML.
|
|
36
|
+
Ready to upload wherever you want.
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
# Install
|
|
43
|
+
npm install -g @yannosay/sinth
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
## Quick Start
|
|
50
|
+
sinth init
|
|
51
|
+
sinth dev pages/index.sinth
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
Open your browser. Edit your .sinth file. Watch it update live.
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
## Your First Sinth File
|
|
59
|
+
```TS
|
|
60
|
+
page
|
|
61
|
+
title = "My Sinth Project"
|
|
62
|
+
|
|
63
|
+
var str name = "World"
|
|
64
|
+
|
|
65
|
+
Main {
|
|
66
|
+
var str name = "User"
|
|
67
|
+
Heading(level: 1) { "Hello, " + name }
|
|
68
|
+
Paragraph { "Welcome to Sinth." }
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
## Features
|
|
77
|
+
|
|
78
|
+
- Mixed logic — if, for, and expressions right in your UI
|
|
79
|
+
- Two-way binding — Input(bind: variable) in one line
|
|
80
|
+
- Expression-based delays ("delay: index * 300") for staggered animations
|
|
81
|
+
- Object support: var obj with dot notation (user.name)
|
|
82
|
+
- Object iteration: for key, value, index in object
|
|
83
|
+
- SCSS support: style blocks with scoped CSS
|
|
84
|
+
- Tree-shaken output: static pages get zero JS, reactive apps get only what they need
|
|
85
|
+
- VS Code extension: full syntax highlighting (search "Sinth" in the marketplace)
|
|
86
|
+
- Live reload dev server: sinth dev watches your files
|
|
87
|
+
- Self-contained HTML
|
|
88
|
+
- \+ more!
|
|
89
|
+
|
|
90
|
+
###### Nothing you like? Give me feedback!
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
## Commands
|
|
95
|
+
|
|
96
|
+
- sinth init — scaffold a new project
|
|
97
|
+
- sinth dev [file] — start dev server with live reload
|
|
98
|
+
- sinth build — compile to static files
|
|
99
|
+
- sinth check — lint without output
|
|
100
|
+
- sinth version — print version
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
## Links
|
|
105
|
+
|
|
106
|
+
- GitHub: [Official Sinth Repo](https://github.com/yannosay/sinth)
|
|
107
|
+
- Website: [Sinth](https://sinth.yannosay.com) (not active at this moment)
|
|
108
|
+
- Discord: [Join here!](https://discord.gg/SUvcrafTQm)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
## License
|
|
113
|
+
|
|
33
114
|
AGPL-3.0
|
package/package.json
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name":
|
|
3
|
-
"version":
|
|
4
|
-
"description":
|
|
5
|
-
"author":
|
|
6
|
-
"license":
|
|
7
|
-
"homepage":
|
|
8
|
-
"repository":
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"keywords":
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"bin":
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"files":
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"dependencies":
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"devDependencies":
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"engines":
|
|
43
|
-
|
|
44
|
-
|
|
2
|
+
"name": "@yannosay/sinth",
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"description": "A declarative language that compiles to pure HTML, CSS, and JavaScript.",
|
|
5
|
+
"author": "Yannosay Productions",
|
|
6
|
+
"license": "AGPL-3.0",
|
|
7
|
+
"homepage": "https://sinth.yannosay.com",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/yannosay/sinth.git"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"html",
|
|
14
|
+
"css",
|
|
15
|
+
"javascript",
|
|
16
|
+
"compiler",
|
|
17
|
+
"declarative",
|
|
18
|
+
"web",
|
|
19
|
+
"components",
|
|
20
|
+
"scss"
|
|
21
|
+
],
|
|
22
|
+
"bin": {
|
|
23
|
+
"sinth": "bin/sinth.js"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"bin/",
|
|
27
|
+
"src/",
|
|
28
|
+
"assets/",
|
|
29
|
+
"tsconfig.json",
|
|
30
|
+
"README.md",
|
|
31
|
+
"LICENSE"
|
|
32
|
+
],
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@yannosay/sinth": "^0.0.9",
|
|
35
|
+
"sass": "^1.70.0",
|
|
36
|
+
"ts-node": "^10.9.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/node": "^20.19.40",
|
|
40
|
+
"typescript": "^5.3.0"
|
|
41
|
+
},
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=18.0.0"
|
|
44
|
+
}
|
|
45
45
|
}
|