@inglorious/web 4.0.1 → 4.0.3
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 +60 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -49,6 +49,8 @@ Available templates:
|
|
|
49
49
|
- **minimal** — plain HTML, CSS, and JS (no build step)
|
|
50
50
|
- **js** — Vite-based JavaScript project
|
|
51
51
|
- **ts** — Vite + TypeScript project
|
|
52
|
+
- **ssx-js** — Static Site Xecution (SSX) project using JavaScript
|
|
53
|
+
- **ssx-ts** — Static Site Xecution (SSX) project using TypeScript
|
|
52
54
|
|
|
53
55
|
Use the scaffolder to create a starter app tailored to your workflow.
|
|
54
56
|
|
|
@@ -83,6 +85,7 @@ It's that simple — and surprisingly fast in practice.
|
|
|
83
85
|
- You want UI to be fully controlled by your entity-based store
|
|
84
86
|
- You want to stay entirely in **JavaScript**, without DSLs or compilers
|
|
85
87
|
- You want **React-like declarative UI** but without the cost and overhead of React
|
|
88
|
+
- You want to build **static sites with SSX** — same entity patterns, pre-rendered HTML, and client hydration
|
|
86
89
|
|
|
87
90
|
This framework is ideal for both small apps and large business UIs.
|
|
88
91
|
|
|
@@ -90,7 +93,6 @@ This framework is ideal for both small apps and large business UIs.
|
|
|
90
93
|
|
|
91
94
|
## When NOT to Use Inglorious Web
|
|
92
95
|
|
|
93
|
-
- You need server-side rendering (SSR) or static site generation (SSG) - WIP
|
|
94
96
|
- You need fine-grained reactivity for very large datasets (1000+ items per view)
|
|
95
97
|
- You're building a library that needs to be framework-agnostic
|
|
96
98
|
- Your team is already deeply invested in React/Vue/Angular
|
|
@@ -310,6 +312,37 @@ The `mount` function subscribes to the store and automatically re-renders your t
|
|
|
310
312
|
|
|
311
313
|
---
|
|
312
314
|
|
|
315
|
+
## JSX Support
|
|
316
|
+
|
|
317
|
+
If you prefer JSX syntax over template literals, you can use **[`@inglorious/vite-plugin-jsx`](https://www.npmjs.com/package/@inglorious/vite-plugin-jsx)**.
|
|
318
|
+
|
|
319
|
+
This Vite plugin transforms standard JSX/TSX into optimized `lit-html` templates at compile time. You get the familiar developer experience of JSX without React's runtime, hooks, or VDOM overhead.
|
|
320
|
+
|
|
321
|
+
To use it:
|
|
322
|
+
|
|
323
|
+
1. Install the plugin: `npm install -D @inglorious/vite-plugin-jsx`
|
|
324
|
+
2. Add it to your `vite.config.js`
|
|
325
|
+
3. Write your render functions using JSX
|
|
326
|
+
|
|
327
|
+
```jsx
|
|
328
|
+
export const counter = {
|
|
329
|
+
render(entity, api) {
|
|
330
|
+
return (
|
|
331
|
+
<div className="counter">
|
|
332
|
+
<span>Count: {entity.value}</span>
|
|
333
|
+
<button onClick={() => api.notify(`#${entity.id}:increment`)}>
|
|
334
|
+
+1
|
|
335
|
+
</button>
|
|
336
|
+
</div>
|
|
337
|
+
)
|
|
338
|
+
},
|
|
339
|
+
}
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
See the plugin documentation for full details on control flow, attributes, and engine components.
|
|
343
|
+
|
|
344
|
+
---
|
|
345
|
+
|
|
313
346
|
## Redux DevTools Integration
|
|
314
347
|
|
|
315
348
|
`@inglorious/web` ships with first-class support for the **Redux DevTools Extension**, allowing you to:
|
|
@@ -1028,6 +1061,23 @@ You can even mix them in the same app!
|
|
|
1028
1061
|
|
|
1029
1062
|
---
|
|
1030
1063
|
|
|
1064
|
+
## Static Site Generation with SSX
|
|
1065
|
+
|
|
1066
|
+
For building **static HTML sites** with full pre-rendering, client-side hydration, and automatic sitemap/RSS generation, use [**@inglorious/ssx**](https://www.npmjs.com/package/@inglorious/ssx).
|
|
1067
|
+
|
|
1068
|
+
SSX is built entirely on **@inglorious/web** and lets you use the same entity-based patterns for both interactive apps and static sites, with:
|
|
1069
|
+
|
|
1070
|
+
- Pre-rendered HTML at build time
|
|
1071
|
+
- Automatic code splitting and lazy loading
|
|
1072
|
+
- Client-side hydration with lit-html
|
|
1073
|
+
- File-based routing
|
|
1074
|
+
- Sitemap and RSS feed generation
|
|
1075
|
+
- Incremental builds
|
|
1076
|
+
|
|
1077
|
+
It's the perfect companion to @inglorious/web for building blazing-fast static sites, blogs, documentation, and marketing pages.
|
|
1078
|
+
|
|
1079
|
+
---
|
|
1080
|
+
|
|
1031
1081
|
## Examples
|
|
1032
1082
|
|
|
1033
1083
|
Check out these demos to see `@inglorious/web` in action:
|
|
@@ -1041,6 +1091,15 @@ Check out these demos to see `@inglorious/web` in action:
|
|
|
1041
1091
|
|
|
1042
1092
|
---
|
|
1043
1093
|
|
|
1094
|
+
## Related Packages
|
|
1095
|
+
|
|
1096
|
+
- [**@inglorious/ssx**](https://www.npmjs.com/package/@inglorious/ssx) - Static site generation with pre-rendering and client hydration
|
|
1097
|
+
- [**@inglorious/store**](https://www.npmjs.com/package/@inglorious/store) - Entity-based state management (used by @inglorious/web)
|
|
1098
|
+
- [**@inglorious/engine**](https://www.npmjs.com/package/@inglorious/engine) - Game engine with the same entity architecture
|
|
1099
|
+
- [**@inglorious/create-app**](https://www.npmjs.com/package/@inglorious/create-app) - Scaffolding tool for quick project setup
|
|
1100
|
+
|
|
1101
|
+
---
|
|
1102
|
+
|
|
1044
1103
|
## License
|
|
1045
1104
|
|
|
1046
1105
|
**MIT License - Free and open source**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inglorious/web",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"description": "A new web framework that leverages the power of the Inglorious Store combined with the performance and simplicity of lit-html.",
|
|
5
5
|
"author": "IceOnFire <antony.mistretta@gmail.com> (https://ingloriouscoderz.it)",
|
|
6
6
|
"license": "MIT",
|