@yannosay/sinth 5.2.0 → 5.2.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.2.2
4
+
5
+ - Documentation: clearer README and package description, working links for the VS Code extension and Sinth IDE.
6
+
7
+ ## 5.2.1
8
+
9
+ - The E0104 hint now covers projects without a `pages/` folder, where root files are pages.
10
+
3
11
  ## 5.2.0
4
12
 
5
13
  - **The `page` keyword is removed.** A file that starts with `page` now fails with E0104 and a hint to delete the line. Every `.sinth` file in `pages/` is a page, and files outside it are modules. `page` can still be used as a variable name.
@@ -9,7 +17,6 @@
9
17
 
10
18
  - Dynamic routes and page detection now work when the project path contains a symlink or junction (macOS temp folders, linked workspaces).
11
19
  - Dev server logs use forward slashes on Windows.
12
- - CI: ESLint runs on Node 22 only.
13
20
 
14
21
  ## 5.1.0
15
22
 
package/DOCS.md CHANGED
@@ -77,7 +77,7 @@ Main {
77
77
  When you are ready:
78
78
 
79
79
  ```bash
80
- npm run build # optimized static site in dist/
80
+ npm run build # optimized production build in dist/
81
81
  npm run preview # serve dist/ locally with production headers
82
82
  npm run deploy # deploy to Cloudflare Pages
83
83
  ```
@@ -1038,7 +1038,7 @@ component Counter(num start = 0, str label = "Count") as <sinth-counter> {
1038
1038
  ## 25. Rendering model and performance
1039
1039
 
1040
1040
  - **Prerendering**: every page is rendered to static HTML at build time, so content is visible immediately and indexable by search engines.
1041
- - **Zero JavaScript for static pages**: if a page has no events, bindings, scripts, watchers or values that can only be known in the browser, Sinth ships no JavaScript at all for it.
1041
+ - **No JavaScript when none is needed**: if a page has no events, bindings, scripts, watchers or values that can only be known in the browser, Sinth ships no JavaScript at all for it.
1042
1042
  - **Fine-grained updates**: interactive pages mount a ~5 kB runtime. Each binding is updated only when its value actually changes. Text, attributes and keyed lists are patched in place; nothing is re-rendered with `innerHTML`.
1043
1043
  - **Code splitting**: shared code across pages is split into cached chunks, and `<link rel="modulepreload">` tags are added automatically.
1044
1044
  - **Static subtrees**: purely static markup inside interactive pages is created from cached templates.
@@ -1178,7 +1178,7 @@ dist/
1178
1178
  └─ contents of public/ and static folders
1179
1179
  ```
1180
1180
 
1181
- The output is a plain static site. It works on Cloudflare Pages, Netlify, Vercel, GitHub Pages, S3, nginx or any static host. Pages are written as `about.html`; most hosts serve them at `/about` (on GitHub Pages and nginx, links to `/about.html` or a rewrite rule may be needed).
1181
+ The output is standard HTML, CSS and JavaScript with no server runtime, so it runs on Cloudflare Pages, Netlify, Vercel, GitHub Pages, S3, nginx or any static host. Pages are written as `about.html`; most hosts serve them at `/about` (on GitHub Pages and nginx, links to `/about.html` or a rewrite rule may be needed).
1182
1182
 
1183
1183
  The build prints every page with its size and whether it ships JavaScript:
1184
1184
 
@@ -1336,7 +1336,7 @@ Run `sinth check` after upgrading. It reports every incompatibility with its loc
1336
1336
  ## 36. FAQ
1337
1337
 
1338
1338
  **Does Sinth need a framework or runtime on the server?**
1339
- No. The output is static HTML, CSS and JavaScript.
1339
+ No. The output is HTML, CSS and JavaScript that any web host can serve.
1340
1340
 
1341
1341
  **Can I use npm packages?**
1342
1342
  Yes. Install them and import them. They are bundled and tree-shaken.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@yannosay/sinth?color=a855f7&label=npm&style=for-the-badge)](https://www.npmjs.com/package/@yannosay/sinth) [![downloads](https://img.shields.io/npm/dt/@yannosay/sinth?color=c084fc&label=downloads&style=for-the-badge)](https://www.npmjs.com/package/@yannosay/sinth) [![CI](https://img.shields.io/github/actions/workflow/status/Yannosay/sinth/ci.yml?branch=main&label=CI&style=for-the-badge)](https://github.com/Yannosay/sinth/actions) [![license](https://img.shields.io/npm/l/@yannosay/sinth?color=a78bfa&style=for-the-badge)](./LICENSE)
4
4
 
5
- **Sinth is a reactive language for building websites and web apps of any size, from a landing page to a large multi-page product.** Write pages and components in one readable syntax. The compiler type-checks your whole project and turns it into static-first HTML, CSS and JavaScript, with no framework to learn.
5
+ **Sinth is a reactive language for building websites and web apps of any size, from a landing page to a large multi-page product.** Write pages and components in one readable syntax. The compiler type-checks your whole project and produces fast, secure HTML, CSS and JavaScript, with no framework to learn.
6
6
 
7
7
  ```sinth
8
8
  title = "Counter"
@@ -20,7 +20,7 @@ Main {
20
20
  - **Easy to read, easy to learn.** Markup, state, logic and styles live together in one file with no boilerplate.
21
21
  - **Reactive by default.** Change a variable and exactly the affected parts of the page update.
22
22
  - **Built to scale.** File-based routing with dynamic routes (`pages/blog/[slug].sinth` generates one page per post), shared layouts and components, project-wide type checking, code splitting and cached chunks. Thousands of pages build in seconds.
23
- - **Static first.** Every page is prerendered to HTML. Pages without interactivity ship zero JavaScript; interactive ones load a ~5 kB runtime.
23
+ - **Fast by default.** Every page is rendered at build time, so it appears instantly and is fully indexable by search engines. Interactivity runs on a ~5 kB runtime with fine-grained updates, and pages that need no JavaScript load none.
24
24
  - **Catches mistakes before the browser does.** Unknown names, missing arguments, wrong types and missing component props are compile errors with "did you mean" hints.
25
25
  - **Secure by default.** No `eval`, escaped output, no inline handlers, strict CSP and security headers out of the box.
26
26
  - **Batteries included.** Dev server with hot reload that keeps state, scoped CSS, a component library (`sinth:ui`), npm packages, SCSS, JSON imports, Google Fonts, custom elements, sitemaps and one-command Cloudflare deploys.
@@ -94,7 +94,8 @@ component TodoList(str title = "Todos") {
94
94
  - **[Full reference (DOCS.md)](./DOCS.md)**: every feature, option and error code
95
95
  - [Website](https://sinth.yannosay.com)
96
96
  - [Changelog](./CHANGELOG.md)
97
- - [VS Code extension](https://marketplace.visualstudio.com/items?itemName=YannosayProductions.sinth-vscode)
97
+ - [VS Code extension](https://github.com/Yannosay/sinth/releases/latest): download `sinth-vscode-*.vsix` from the latest release and run **Extensions: Install from VSIX**
98
+ - [Sinth IDE](https://github.com/Yannosay/sinth-ide/releases/latest): the desktop editor for Sinth (Windows, macOS, Linux)
98
99
 
99
100
  ## Community
100
101
 
@@ -112,7 +112,7 @@ class Parser {
112
112
  components: [], styles: [], scripts: [], lifecycle: [], watchers: [], body: [],
113
113
  };
114
114
  if (this.isIdent("page") && (this.peek(1).kind === "eof" || this.peek(1).newlineBefore)) {
115
- throw new diagnostics_1.SinthError("E0104", "The 'page' keyword was removed", this.tok.loc, "Delete this line. Every .sinth file in pages/ is a page; files outside pages/ are modules");
115
+ throw new diagnostics_1.SinthError("E0104", "The 'page' keyword was removed", this.tok.loc, "Delete this line. Files in pages/ (or in the project root when there is no pages/ folder) are pages automatically");
116
116
  }
117
117
  const declared = new Set();
118
118
  while (this.tok.kind !== "eof") {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yannosay/sinth",
3
- "version": "5.2.0",
4
- "description": "A declarative, reactive UI language that compiles to fast, secure, static-first HTML, CSS and JavaScript.",
3
+ "version": "5.2.2",
4
+ "description": "A reactive language for websites and web apps of any size: type-checked components, file-based and dynamic routing, prerendered pages and one-command deploys.",
5
5
  "author": "Yannosay Productions",
6
6
  "license": "AGPL-3.0",
7
7
  "homepage": "https://sinth.yannosay.com",
@@ -16,14 +16,17 @@
16
16
  "sinth",
17
17
  "language",
18
18
  "compiler",
19
- "ui",
19
+ "web-framework",
20
20
  "reactive",
21
- "declarative",
22
- "static-site",
21
+ "components",
22
+ "ui",
23
+ "routing",
24
+ "ssg",
25
+ "prerendering",
26
+ "typescript-alternative",
23
27
  "html",
24
28
  "css",
25
29
  "web",
26
- "components",
27
30
  "cloudflare-pages"
28
31
  ],
29
32
  "bin": {