glashjs 0.11.0 → 0.11.1
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 +11 -6
- package/bin/glash.mjs +8 -8
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -75,14 +75,19 @@ export const POST = (ctx) => json({ created: ctx.body }, { status: 201 });
|
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
```bash
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
78
|
+
glashjs dev # dev server (live reload) — prints a Local + Network (LAN IP) URL
|
|
79
|
+
# ➜ Local: http://localhost:3000
|
|
80
|
+
# ➜ Network: http://192.168.1.57:3000 (open from your phone/other devices)
|
|
81
|
+
glashjs serve # production server over routes/ + built assets (Brotli-negotiated)
|
|
82
|
+
glashjs update # update glashjs to the latest published version
|
|
83
|
+
glashjs build # optimize assets + precompile routes
|
|
84
|
+
glashjs deploy # build, then deploy to glashdb
|
|
84
85
|
```
|
|
85
86
|
|
|
87
|
+
> glashjs installs **two** bins — `glashjs` and `glash` — both run the same CLI.
|
|
88
|
+
> Use **`glashjs <cmd>`** in projects that also have the `@glash/cli`/`glashdb`
|
|
89
|
+
> deploy CLI installed, since that package owns the `glash` name there.
|
|
90
|
+
|
|
86
91
|
**`<Image>`** (better than `next/image` — no runtime image server, uses the build's AVIF/WebP):
|
|
87
92
|
```jsx
|
|
88
93
|
import { Image } from 'glashjs/image';
|
package/bin/glash.mjs
CHANGED
|
@@ -84,14 +84,14 @@ async function main() {
|
|
|
84
84
|
default:
|
|
85
85
|
console.log(`glashjs — fast, offline-capable, hard-to-hack sites
|
|
86
86
|
|
|
87
|
-
Usage:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
87
|
+
Usage: (run as "glashjs <cmd>"; "glash <cmd>" also works unless the glashdb deploy CLI owns that name)
|
|
88
|
+
glashjs dev [--port 3000] Run the dev server (routing, SSR, API, live reload) + Network preview URL
|
|
89
|
+
glashjs serve [--port 3000] Run the production server over routes/ + built assets
|
|
90
|
+
glashjs build [--root <dir>] Optimize assets, precompile routes, generate offline SW + PWA + security
|
|
91
|
+
glashjs update Update glashjs to the latest published version
|
|
92
|
+
glashjs deploy [--dry-run] Build, then deploy to glashdb (hands off to the glashdb CLI)
|
|
93
|
+
glashjs optimize [<dir>] Just run the asset optimizer over a directory
|
|
94
|
+
glashjs version Print version
|
|
95
95
|
|
|
96
96
|
Docs: ./README.md`);
|
|
97
97
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "glashjs",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "glashjs — a web framework built on top of Next.js: file-based routing, SSR, API routes, JSX components with client hydration, nested layouts, streaming SSR, a best-in-class build-time asset optimizer, offline PWA layer, animated favicon, and secure-by-default headers. Zero mandatory dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
+
"glashjs": "bin/glash.mjs",
|
|
7
8
|
"glash": "bin/glash.mjs"
|
|
8
9
|
},
|
|
9
10
|
"exports": {
|