jskelet 0.6.3 → 0.6.4
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/AGENTS.md +136 -136
- package/CHANGELOG.md +628 -620
- package/LICENSE +21 -21
- package/README.md +2 -0
- package/bin/jskelet.mjs +130 -130
- package/docs/01-baslangic.md +291 -291
- package/docs/02-mimari.md +310 -310
- package/docs/03-routing.md +515 -515
- package/docs/04-render-ve-sablonlar.md +667 -661
- package/docs/05-islands.md +486 -486
- package/docs/06-cache.md +1467 -1443
- package/docs/07-yapilandirma.md +1208 -1197
- package/docs/08-build.md +429 -429
- package/docs/09-dev-araclari.md +364 -364
- package/docs/10-dagitim.md +348 -338
- package/docs/12-panel-ve-oturum.md +479 -478
- package/docs/README.md +83 -83
- package/docs/en/01-getting-started.md +298 -298
- package/docs/en/02-architecture.md +329 -329
- package/docs/en/03-routing.md +531 -531
- package/docs/en/04-rendering.md +675 -669
- package/docs/en/05-islands.md +497 -497
- package/docs/en/06-caching.md +1476 -1453
- package/docs/en/07-configuration.md +1229 -1219
- package/docs/en/08-build.md +447 -447
- package/docs/en/09-dev-tools.md +373 -373
- package/docs/en/10-deployment.md +351 -340
- package/docs/en/11-migration.md +398 -398
- package/docs/en/12-dashboards-and-sessions.md +489 -488
- package/docs/en/README.md +87 -87
- package/package.json +137 -137
- package/src/build/ensure-build.mjs +19 -19
- package/src/build/paths.mjs +153 -153
- package/src/build/resolve-peer.mjs +36 -36
- package/src/build/tasks/client.mjs +349 -349
- package/src/build/tasks/css.mjs +235 -235
- package/src/build/tasks/fonts.mjs +146 -146
- package/src/build/tasks/icons.mjs +357 -357
- package/src/build/tasks/images.mjs +244 -244
- package/src/build/tasks/precompress.mjs +78 -78
- package/src/build/tasks/templates.mjs +20 -20
- package/src/client/admin/i18n.js +764 -764
- package/src/client/admin/login.html +74 -74
- package/src/client/admin/panel.css +809 -809
- package/src/client/admin/panel.html +495 -495
- package/src/client/admin/panel.js +1251 -1251
- package/src/client/devtools/report.html +185 -185
- package/src/client/devtools/report.js +745 -745
- package/src/client/devtools/seo.js +628 -628
- package/src/client/dom.js +95 -95
- package/src/client/form.js +192 -192
- package/src/client/index.js +45 -45
- package/src/client/registry.js +305 -305
- package/src/client/safe-image.js +91 -91
- package/src/client/shared-cookie.js +225 -225
- package/src/client/store.js +36 -36
- package/src/client/swap.js +188 -188
- package/src/compile/codegen.js +336 -336
- package/src/compile/compile-all.js +149 -149
- package/src/compile/errors.js +66 -66
- package/src/compile/expr.js +409 -409
- package/src/compile/index.js +17 -17
- package/src/compile/parse.js +541 -541
- package/src/compile/resolve.js +211 -211
- package/src/compile/scan-exports.js +51 -51
- package/src/config/defaults.js +541 -534
- package/src/config/index.js +1500 -1469
- package/src/config/pattern.js +107 -107
- package/src/generate.mjs +163 -163
- package/src/http/control-flow.js +71 -71
- package/src/http/cookies-entry.js +21 -21
- package/src/http/cookies.js +277 -277
- package/src/http/request-cache.js +46 -46
- package/src/http/request-context.js +165 -165
- package/src/http/shared-cookie.js +178 -178
- package/src/index.js +101 -101
- package/src/init.mjs +232 -230
- package/src/migrate/apply.mjs +262 -262
- package/src/migrate/babel.mjs +79 -79
- package/src/migrate/classify.mjs +155 -155
- package/src/migrate/config.mjs +126 -126
- package/src/migrate/fs-walk.mjs +191 -191
- package/src/migrate/parse.mjs +26 -26
- package/src/migrate/scan.mjs +177 -177
- package/src/migrate/transform/expr-source.mjs +168 -168
- package/src/migrate/transform/island.mjs +67 -67
- package/src/migrate/transform/jsx-to-component.mjs +302 -302
- package/src/migrate/transform/jsx-to-jsk.mjs +330 -330
- package/src/migrate/transform/page-split.mjs +435 -435
- package/src/migrate/write.mjs +81 -81
- package/src/migrate.mjs +171 -171
- package/src/runtime/alias-hooks.mjs +119 -119
- package/src/runtime/register.mjs +4 -4
- package/src/server/admin/actions.js +229 -229
- package/src/server/admin/auth.js +125 -125
- package/src/server/admin/event-log.js +151 -151
- package/src/server/admin/gate.js +209 -209
- package/src/server/admin/inventory.js +188 -188
- package/src/server/admin/mount.js +56 -56
- package/src/server/admin/router.js +216 -216
- package/src/server/admin/snapshot.js +241 -241
- package/src/server/assets.js +147 -147
- package/src/server/auth/handoff.js +309 -309
- package/src/server/cache-blob.js +70 -70
- package/src/server/cache-control.js +45 -0
- package/src/server/cache-deps.js +42 -42
- package/src/server/cache-vary.js +113 -113
- package/src/server/cloudflare.js +607 -607
- package/src/server/create-app.js +366 -366
- package/src/server/data-cache.js +553 -553
- package/src/server/dev/report.js +485 -485
- package/src/server/dev/socket.js +170 -170
- package/src/server/dev/version-check.mjs +139 -139
- package/src/server/disk-cache.js +233 -233
- package/src/server/ejs-adapter.js +59 -59
- package/src/server/html-cache.js +1196 -1196
- package/src/server/image-optimizer.js +500 -500
- package/src/server/logs/access-middleware.js +66 -66
- package/src/server/logs/file-sink.js +193 -193
- package/src/server/logs/pipeline.js +165 -165
- package/src/server/logs/s3-put.js +214 -214
- package/src/server/logs/s3-sink.js +112 -112
- package/src/server/metadata.js +102 -102
- package/src/server/middleware/compression.js +205 -205
- package/src/server/middleware/csrf.js +134 -134
- package/src/server/middleware/dev-gate.js +75 -75
- package/src/server/middleware/headers.js +37 -37
- package/src/server/middleware/redirects.js +32 -32
- package/src/server/middleware/robots-txt.js +341 -341
- package/src/server/middleware/static-precompressed.js +121 -121
- package/src/server/middleware/trailing-slash.js +53 -53
- package/src/server/middleware/upstream-proxy.js +141 -141
- package/src/server/og-image.js +369 -356
- package/src/server/port-guard.js +255 -255
- package/src/server/prewarm.js +1082 -1082
- package/src/server/redis.js +588 -588
- package/src/server/render.js +910 -910
- package/src/server/router.js +157 -157
- package/src/server/status-page.js +265 -265
- package/src/server/upstream-limiter.js +376 -376
- package/src/server/upstream-tracking.js +166 -166
- package/src/shared/cookie-domain.js +66 -66
- package/src/start.mjs +22 -22
- package/src/templates/layout.ejs +30 -30
- package/src/templates/layout.jsk +30 -30
- package/src/version.mjs +31 -31
- package/src/views/components/loader.js +101 -101
- package/src/views/helpers/html.js +102 -102
- package/src/views/helpers/tags.js +375 -375
- package/types/config/defaults.d.ts +6 -0
- package/types/config/index.d.ts +6 -0
- package/types/server/cache-control.d.ts +28 -0
- package/types/server/og-image.d.ts +5 -0
package/docs/en/README.md
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
# JSkelet documentation
|
|
2
|
-
|
|
3
|
-
JSkelet is a framework that "feels frameworkless", built for SEO- and
|
|
4
|
-
speed-focused sites: it produces complete HTML on the server with Express 5 +
|
|
5
|
-
build-time `.jsk` (EJS is an optional legacy peer), adds interactivity with
|
|
6
|
-
vanilla JS islands, compiles CSS into a single stylesheet with Tailwind v4, and
|
|
7
|
-
instead of ISR uses an HTML TTL cache that lives in process memory with
|
|
8
|
-
stale-while-revalidate. No React; the framework source is plain JavaScript with
|
|
9
|
-
JSDoc. Apps may write client islands and entries in TypeScript, and the
|
|
10
|
-
published package ships declaration files.
|
|
11
|
-
|
|
12
|
-
This directory is the full reference for the framework. To read it in order,
|
|
13
|
-
start from the beginning; if you are looking for a specific topic, go straight
|
|
14
|
-
to the relevant entry.
|
|
15
|
-
|
|
16
|
-
The Turkish edition of the same documents lives one directory up, in
|
|
17
|
-
[`docs/`](../README.md). Both editions are kept in sync by hand, so if you
|
|
18
|
-
change one, change the other.
|
|
19
|
-
|
|
20
|
-
## Read in order
|
|
21
|
-
|
|
22
|
-
| Document | Topic |
|
|
23
|
-
| --- | --- |
|
|
24
|
-
| [01-getting-started.md](./01-getting-started.md) | Installation, `jskelet init`, first route, first island, directory structure, CLI commands |
|
|
25
|
-
| [02-architecture.md](./02-architecture.md) | Architectural decisions and their rationale: the island model, complete server HTML, cache strategy, middleware order |
|
|
26
|
-
| [03-routing.md](./03-routing.md) | The route module contract, load order, the controller contract, `ctx`, `notFound`/`redirect`, config redirects/rewrites |
|
|
27
|
-
| [04-rendering.md](./04-rendering.md) | `.jsk` layout/pages, automatic component registration, `html`/`tags`, metadata → `<head>`, hooks; EJS legacy |
|
|
28
|
-
| [05-islands.md](./05-islands.md) | The `data-island` contract, hydration strategies, `client/entries/*`, `createStore`, DOM helpers, `startSafeImages` |
|
|
29
|
-
| [06-caching.md](./06-caching.md) | `withHtmlCache`, `revalidate`, stale-while-revalidate, the cache key, `X-JSkelet-Cache`, in-request cache, degraded render, prewarm |
|
|
30
|
-
| [07-configuration.md](./07-configuration.md) | Full `jskelet.config.mjs` reference, the `source` pattern syntax, environment variable table |
|
|
31
|
-
| [08-build.md](./08-build.md) | The build pipeline, the manifest, hashed assets, CSS/Tailwind `@source`, fonts, icon sprite, image optimization, precompress |
|
|
32
|
-
| [09-dev-tools.md](./09-dev-tools.md) | The `jskelet dev` flow, watch directories, CSS hot-swap, devtools overlay (Alt+D, SEO highlight), the report page, the dev gate |
|
|
33
|
-
| [10-deployment.md](./10-deployment.md) | Prod build + start, environment variables, Docker, reverse proxy, health check |
|
|
34
|
-
| [11-migration.md](./11-migration.md) | Migrating from Next.js: the equivalence table and a step-by-step plan |
|
|
35
|
-
| [12-dashboards-and-sessions.md](./12-dashboards-and-sessions.md) | Per-visitor pages: `private: true`, signed cookie sessions, CSRF, `fragment()`, swapping regions and the form loop |
|
|
36
|
-
|
|
37
|
-
## Quick access by topic
|
|
38
|
-
|
|
39
|
-
- **How do I add a page?** → [03-routing.md](./03-routing.md) and
|
|
40
|
-
[04-rendering.md](./04-rendering.md)
|
|
41
|
-
- **I want something to happen when a button is clicked** →
|
|
42
|
-
[05-islands.md](./05-islands.md)
|
|
43
|
-
- **Why is the page returning `MISS` / why am I seeing stale data?** →
|
|
44
|
-
[06-caching.md](./06-caching.md)
|
|
45
|
-
- **How do I write a page that depends on the session?** →
|
|
46
|
-
[12-dashboards-and-sessions.md](./12-dashboards-and-sessions.md)
|
|
47
|
-
- **What does each config field do?** → [07-configuration.md](./07-configuration.md)
|
|
48
|
-
- **Styles are missing / icons don't show up** → [08-build.md](./08-build.md)
|
|
49
|
-
- **Going live** → [10-deployment.md](./10-deployment.md)
|
|
50
|
-
|
|
51
|
-
## Runnable examples
|
|
52
|
-
|
|
53
|
-
All three are in working order; most of the examples in the docs were taken from
|
|
54
|
-
them.
|
|
55
|
-
|
|
56
|
-
**`examples/minimal/`** — two routes, one component, one island, minimal config.
|
|
57
|
-
The smallest working form of the framework.
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
npm --prefix examples/minimal install
|
|
61
|
-
npm --prefix examples/minimal run dev
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
**`examples/blog/`** — a dynamic route (`/blog/:slug`), tag pages, the whole of
|
|
65
|
-
the `redirects`/`rewrites`/`headers`/`cache` configuration, tab panels arriving
|
|
66
|
-
as fragments, form submission, prewarm,
|
|
67
|
-
`robots.txt`/`sitemap.xml`/`rss.xml`, dynamic OG images (`/og/blog/:slug.png`)
|
|
68
|
-
and four islands (theme, tabs, search, form).
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
npm --prefix examples/blog install
|
|
72
|
-
npm --prefix examples/blog run dev
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
**`examples/dashboard/`** — the opposite axis from the other two: per-visitor
|
|
76
|
-
pages. Sign-in with a signed cookie session, a `private: true` protected panel,
|
|
77
|
-
a paginated table fragment, a CSRF-protected mutation form and an island that
|
|
78
|
-
returns a cleanup function. It also has a public landing page, so a cached
|
|
79
|
-
response and a `no-store` one sit side by side in the same application.
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
npm --prefix examples/dashboard install
|
|
83
|
-
npm --prefix examples/dashboard run dev
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
In all three examples, `node smoke.mjs` verifies that the endpoints respond as
|
|
87
|
-
expected while the server is up.
|
|
1
|
+
# JSkelet documentation
|
|
2
|
+
|
|
3
|
+
JSkelet is a framework that "feels frameworkless", built for SEO- and
|
|
4
|
+
speed-focused sites: it produces complete HTML on the server with Express 5 +
|
|
5
|
+
build-time `.jsk` (EJS is an optional legacy peer), adds interactivity with
|
|
6
|
+
vanilla JS islands, compiles CSS into a single stylesheet with Tailwind v4, and
|
|
7
|
+
instead of ISR uses an HTML TTL cache that lives in process memory with
|
|
8
|
+
stale-while-revalidate. No React; the framework source is plain JavaScript with
|
|
9
|
+
JSDoc. Apps may write client islands and entries in TypeScript, and the
|
|
10
|
+
published package ships declaration files.
|
|
11
|
+
|
|
12
|
+
This directory is the full reference for the framework. To read it in order,
|
|
13
|
+
start from the beginning; if you are looking for a specific topic, go straight
|
|
14
|
+
to the relevant entry.
|
|
15
|
+
|
|
16
|
+
The Turkish edition of the same documents lives one directory up, in
|
|
17
|
+
[`docs/`](../README.md). Both editions are kept in sync by hand, so if you
|
|
18
|
+
change one, change the other.
|
|
19
|
+
|
|
20
|
+
## Read in order
|
|
21
|
+
|
|
22
|
+
| Document | Topic |
|
|
23
|
+
| --- | --- |
|
|
24
|
+
| [01-getting-started.md](./01-getting-started.md) | Installation, `jskelet init`, first route, first island, directory structure, CLI commands |
|
|
25
|
+
| [02-architecture.md](./02-architecture.md) | Architectural decisions and their rationale: the island model, complete server HTML, cache strategy, middleware order |
|
|
26
|
+
| [03-routing.md](./03-routing.md) | The route module contract, load order, the controller contract, `ctx`, `notFound`/`redirect`, config redirects/rewrites |
|
|
27
|
+
| [04-rendering.md](./04-rendering.md) | `.jsk` layout/pages, automatic component registration, `html`/`tags`, metadata → `<head>`, hooks; EJS legacy |
|
|
28
|
+
| [05-islands.md](./05-islands.md) | The `data-island` contract, hydration strategies, `client/entries/*`, `createStore`, DOM helpers, `startSafeImages` |
|
|
29
|
+
| [06-caching.md](./06-caching.md) | `withHtmlCache`, `revalidate`, stale-while-revalidate, the cache key, `X-JSkelet-Cache`, in-request cache, degraded render, prewarm |
|
|
30
|
+
| [07-configuration.md](./07-configuration.md) | Full `jskelet.config.mjs` reference, the `source` pattern syntax, environment variable table |
|
|
31
|
+
| [08-build.md](./08-build.md) | The build pipeline, the manifest, hashed assets, CSS/Tailwind `@source`, fonts, icon sprite, image optimization, precompress |
|
|
32
|
+
| [09-dev-tools.md](./09-dev-tools.md) | The `jskelet dev` flow, watch directories, CSS hot-swap, devtools overlay (Alt+D, SEO highlight), the report page, the dev gate |
|
|
33
|
+
| [10-deployment.md](./10-deployment.md) | Prod build + start, environment variables, Docker, reverse proxy, health check |
|
|
34
|
+
| [11-migration.md](./11-migration.md) | Migrating from Next.js: the equivalence table and a step-by-step plan |
|
|
35
|
+
| [12-dashboards-and-sessions.md](./12-dashboards-and-sessions.md) | Per-visitor pages: `private: true`, signed cookie sessions, CSRF, `fragment()`, swapping regions and the form loop |
|
|
36
|
+
|
|
37
|
+
## Quick access by topic
|
|
38
|
+
|
|
39
|
+
- **How do I add a page?** → [03-routing.md](./03-routing.md) and
|
|
40
|
+
[04-rendering.md](./04-rendering.md)
|
|
41
|
+
- **I want something to happen when a button is clicked** →
|
|
42
|
+
[05-islands.md](./05-islands.md)
|
|
43
|
+
- **Why is the page returning `MISS` / why am I seeing stale data?** →
|
|
44
|
+
[06-caching.md](./06-caching.md)
|
|
45
|
+
- **How do I write a page that depends on the session?** →
|
|
46
|
+
[12-dashboards-and-sessions.md](./12-dashboards-and-sessions.md)
|
|
47
|
+
- **What does each config field do?** → [07-configuration.md](./07-configuration.md)
|
|
48
|
+
- **Styles are missing / icons don't show up** → [08-build.md](./08-build.md)
|
|
49
|
+
- **Going live** → [10-deployment.md](./10-deployment.md)
|
|
50
|
+
|
|
51
|
+
## Runnable examples
|
|
52
|
+
|
|
53
|
+
All three are in working order; most of the examples in the docs were taken from
|
|
54
|
+
them.
|
|
55
|
+
|
|
56
|
+
**`examples/minimal/`** — two routes, one component, one island, minimal config.
|
|
57
|
+
The smallest working form of the framework.
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npm --prefix examples/minimal install
|
|
61
|
+
npm --prefix examples/minimal run dev
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**`examples/blog/`** — a dynamic route (`/blog/:slug`), tag pages, the whole of
|
|
65
|
+
the `redirects`/`rewrites`/`headers`/`cache` configuration, tab panels arriving
|
|
66
|
+
as fragments, form submission, prewarm,
|
|
67
|
+
`robots.txt`/`sitemap.xml`/`rss.xml`, dynamic OG images (`/og/blog/:slug.png`)
|
|
68
|
+
and four islands (theme, tabs, search, form).
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
npm --prefix examples/blog install
|
|
72
|
+
npm --prefix examples/blog run dev
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**`examples/dashboard/`** — the opposite axis from the other two: per-visitor
|
|
76
|
+
pages. Sign-in with a signed cookie session, a `private: true` protected panel,
|
|
77
|
+
a paginated table fragment, a CSRF-protected mutation form and an island that
|
|
78
|
+
returns a cleanup function. It also has a public landing page, so a cached
|
|
79
|
+
response and a `no-store` one sit side by side in the same application.
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npm --prefix examples/dashboard install
|
|
83
|
+
npm --prefix examples/dashboard run dev
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
In all three examples, `node smoke.mjs` verifies that the endpoints respond as
|
|
87
|
+
expected while the server is up.
|
package/package.json
CHANGED
|
@@ -1,138 +1,138 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "jskelet",
|
|
3
|
-
"version": "0.6.
|
|
4
|
-
"description": "A framework that feels like no framework: Express 5 + build-time .jsk SSR (optional EJS peer), vanilla JS islands, Tailwind v4 and an in-process HTML TTL cache.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"author": "Ayberk Enis",
|
|
8
|
-
"homepage": "https://github.com/ayberkenis/jskelet#readme",
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/ayberkenis/jskelet.git"
|
|
12
|
-
},
|
|
13
|
-
"bugs": {
|
|
14
|
-
"url": "https://github.com/ayberkenis/jskelet/issues"
|
|
15
|
-
},
|
|
16
|
-
"keywords": [
|
|
17
|
-
"ssr",
|
|
18
|
-
"islands",
|
|
19
|
-
"express",
|
|
20
|
-
"jsk",
|
|
21
|
-
"esbuild",
|
|
22
|
-
"tailwind",
|
|
23
|
-
"seo",
|
|
24
|
-
"isr"
|
|
25
|
-
],
|
|
26
|
-
"bin": {
|
|
27
|
-
"jskelet": "./bin/jskelet.mjs"
|
|
28
|
-
},
|
|
29
|
-
"main": "./src/index.js",
|
|
30
|
-
"exports": {
|
|
31
|
-
".": {
|
|
32
|
-
"types": "./types/index.d.ts",
|
|
33
|
-
"default": "./src/index.js"
|
|
34
|
-
},
|
|
35
|
-
"./server": {
|
|
36
|
-
"types": "./types/index.d.ts",
|
|
37
|
-
"default": "./src/index.js"
|
|
38
|
-
},
|
|
39
|
-
"./client": {
|
|
40
|
-
"types": "./types/client/index.d.ts",
|
|
41
|
-
"default": "./src/client/index.js"
|
|
42
|
-
},
|
|
43
|
-
"./html": {
|
|
44
|
-
"types": "./types/views/helpers/html.d.ts",
|
|
45
|
-
"default": "./src/views/helpers/html.js"
|
|
46
|
-
},
|
|
47
|
-
"./tags": {
|
|
48
|
-
"types": "./types/views/helpers/tags.d.ts",
|
|
49
|
-
"default": "./src/views/helpers/tags.js"
|
|
50
|
-
},
|
|
51
|
-
"./cookies": {
|
|
52
|
-
"types": "./types/http/cookies-entry.d.ts",
|
|
53
|
-
"default": "./src/http/cookies-entry.js"
|
|
54
|
-
},
|
|
55
|
-
"./log": {
|
|
56
|
-
"types": "./types/log.d.mts",
|
|
57
|
-
"default": "./src/log.mjs"
|
|
58
|
-
},
|
|
59
|
-
"./register": "./src/runtime/register.mjs",
|
|
60
|
-
"./layout": "./src/templates/layout.jsk",
|
|
61
|
-
"./layout/ejs": "./src/templates/layout.ejs"
|
|
62
|
-
},
|
|
63
|
-
"files": [
|
|
64
|
-
"bin",
|
|
65
|
-
"src",
|
|
66
|
-
"types",
|
|
67
|
-
"docs",
|
|
68
|
-
"README.md",
|
|
69
|
-
"AGENTS.md",
|
|
70
|
-
"CHANGELOG.md",
|
|
71
|
-
"LICENSE"
|
|
72
|
-
],
|
|
73
|
-
"engines": {
|
|
74
|
-
"node": ">=22"
|
|
75
|
-
},
|
|
76
|
-
"scripts": {
|
|
77
|
-
"lint": "eslint",
|
|
78
|
-
"test": "node --test \"test/**/*.test.mjs\"",
|
|
79
|
-
"types": "tsc -p tsconfig.types.json",
|
|
80
|
-
"prepublishOnly": "npm run types",
|
|
81
|
-
"test:framework-layout": "node scripts/compile-framework-layout.mjs --check",
|
|
82
|
-
"example:minimal": "npm --prefix examples/minimal run dev",
|
|
83
|
-
"example:blog": "npm --prefix examples/blog run dev",
|
|
84
|
-
"example:dashboard": "npm --prefix examples/dashboard run dev"
|
|
85
|
-
},
|
|
86
|
-
"dependencies": {
|
|
87
|
-
"@babel/parser": "^8.0.6",
|
|
88
|
-
"@babel/types": "^8.0.6",
|
|
89
|
-
"esbuild": "^0.28.2",
|
|
90
|
-
"express": "^5.2.1",
|
|
91
|
-
"tailwind-merge": "^3.5.0"
|
|
92
|
-
},
|
|
93
|
-
"peerDependencies": {
|
|
94
|
-
"@phosphor-icons/core": "^2.1.1",
|
|
95
|
-
"@tailwindcss/postcss": "^4.3.3",
|
|
96
|
-
"ejs": "^6.0.1",
|
|
97
|
-
"ioredis": "^5.4.0 || ^6.0.0",
|
|
98
|
-
"lightningcss": "^1.32.0",
|
|
99
|
-
"postcss": "^8.5.26",
|
|
100
|
-
"sharp": "^0.35.4",
|
|
101
|
-
"tailwindcss": "^4.3.3"
|
|
102
|
-
},
|
|
103
|
-
"peerDependenciesMeta": {
|
|
104
|
-
"@phosphor-icons/core": {
|
|
105
|
-
"optional": true
|
|
106
|
-
},
|
|
107
|
-
"@tailwindcss/postcss": {
|
|
108
|
-
"optional": true
|
|
109
|
-
},
|
|
110
|
-
"ejs": {
|
|
111
|
-
"optional": true
|
|
112
|
-
},
|
|
113
|
-
"ioredis": {
|
|
114
|
-
"optional": true
|
|
115
|
-
},
|
|
116
|
-
"lightningcss": {
|
|
117
|
-
"optional": true
|
|
118
|
-
},
|
|
119
|
-
"postcss": {
|
|
120
|
-
"optional": true
|
|
121
|
-
},
|
|
122
|
-
"sharp": {
|
|
123
|
-
"optional": true
|
|
124
|
-
},
|
|
125
|
-
"tailwindcss": {
|
|
126
|
-
"optional": true
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
"devDependencies": {
|
|
130
|
-
"@eslint/js": "^9",
|
|
131
|
-
"@types/express": "^5.0.6",
|
|
132
|
-
"@types/node": "^26.6.1",
|
|
133
|
-
"ejs": "^6.0.1",
|
|
134
|
-
"eslint": "^9",
|
|
135
|
-
"globals": "^16",
|
|
136
|
-
"typescript": "^7.0.2"
|
|
137
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "jskelet",
|
|
3
|
+
"version": "0.6.4",
|
|
4
|
+
"description": "A framework that feels like no framework: Express 5 + build-time .jsk SSR (optional EJS peer), vanilla JS islands, Tailwind v4 and an in-process HTML TTL cache.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Ayberk Enis",
|
|
8
|
+
"homepage": "https://github.com/ayberkenis/jskelet#readme",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/ayberkenis/jskelet.git"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/ayberkenis/jskelet/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"ssr",
|
|
18
|
+
"islands",
|
|
19
|
+
"express",
|
|
20
|
+
"jsk",
|
|
21
|
+
"esbuild",
|
|
22
|
+
"tailwind",
|
|
23
|
+
"seo",
|
|
24
|
+
"isr"
|
|
25
|
+
],
|
|
26
|
+
"bin": {
|
|
27
|
+
"jskelet": "./bin/jskelet.mjs"
|
|
28
|
+
},
|
|
29
|
+
"main": "./src/index.js",
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"types": "./types/index.d.ts",
|
|
33
|
+
"default": "./src/index.js"
|
|
34
|
+
},
|
|
35
|
+
"./server": {
|
|
36
|
+
"types": "./types/index.d.ts",
|
|
37
|
+
"default": "./src/index.js"
|
|
38
|
+
},
|
|
39
|
+
"./client": {
|
|
40
|
+
"types": "./types/client/index.d.ts",
|
|
41
|
+
"default": "./src/client/index.js"
|
|
42
|
+
},
|
|
43
|
+
"./html": {
|
|
44
|
+
"types": "./types/views/helpers/html.d.ts",
|
|
45
|
+
"default": "./src/views/helpers/html.js"
|
|
46
|
+
},
|
|
47
|
+
"./tags": {
|
|
48
|
+
"types": "./types/views/helpers/tags.d.ts",
|
|
49
|
+
"default": "./src/views/helpers/tags.js"
|
|
50
|
+
},
|
|
51
|
+
"./cookies": {
|
|
52
|
+
"types": "./types/http/cookies-entry.d.ts",
|
|
53
|
+
"default": "./src/http/cookies-entry.js"
|
|
54
|
+
},
|
|
55
|
+
"./log": {
|
|
56
|
+
"types": "./types/log.d.mts",
|
|
57
|
+
"default": "./src/log.mjs"
|
|
58
|
+
},
|
|
59
|
+
"./register": "./src/runtime/register.mjs",
|
|
60
|
+
"./layout": "./src/templates/layout.jsk",
|
|
61
|
+
"./layout/ejs": "./src/templates/layout.ejs"
|
|
62
|
+
},
|
|
63
|
+
"files": [
|
|
64
|
+
"bin",
|
|
65
|
+
"src",
|
|
66
|
+
"types",
|
|
67
|
+
"docs",
|
|
68
|
+
"README.md",
|
|
69
|
+
"AGENTS.md",
|
|
70
|
+
"CHANGELOG.md",
|
|
71
|
+
"LICENSE"
|
|
72
|
+
],
|
|
73
|
+
"engines": {
|
|
74
|
+
"node": ">=22"
|
|
75
|
+
},
|
|
76
|
+
"scripts": {
|
|
77
|
+
"lint": "eslint",
|
|
78
|
+
"test": "node --test \"test/**/*.test.mjs\"",
|
|
79
|
+
"types": "tsc -p tsconfig.types.json",
|
|
80
|
+
"prepublishOnly": "npm run types",
|
|
81
|
+
"test:framework-layout": "node scripts/compile-framework-layout.mjs --check",
|
|
82
|
+
"example:minimal": "npm --prefix examples/minimal run dev",
|
|
83
|
+
"example:blog": "npm --prefix examples/blog run dev",
|
|
84
|
+
"example:dashboard": "npm --prefix examples/dashboard run dev"
|
|
85
|
+
},
|
|
86
|
+
"dependencies": {
|
|
87
|
+
"@babel/parser": "^8.0.6",
|
|
88
|
+
"@babel/types": "^8.0.6",
|
|
89
|
+
"esbuild": "^0.28.2",
|
|
90
|
+
"express": "^5.2.1",
|
|
91
|
+
"tailwind-merge": "^3.5.0"
|
|
92
|
+
},
|
|
93
|
+
"peerDependencies": {
|
|
94
|
+
"@phosphor-icons/core": "^2.1.1",
|
|
95
|
+
"@tailwindcss/postcss": "^4.3.3",
|
|
96
|
+
"ejs": "^6.0.1",
|
|
97
|
+
"ioredis": "^5.4.0 || ^6.0.0",
|
|
98
|
+
"lightningcss": "^1.32.0",
|
|
99
|
+
"postcss": "^8.5.26",
|
|
100
|
+
"sharp": "^0.35.4",
|
|
101
|
+
"tailwindcss": "^4.3.3"
|
|
102
|
+
},
|
|
103
|
+
"peerDependenciesMeta": {
|
|
104
|
+
"@phosphor-icons/core": {
|
|
105
|
+
"optional": true
|
|
106
|
+
},
|
|
107
|
+
"@tailwindcss/postcss": {
|
|
108
|
+
"optional": true
|
|
109
|
+
},
|
|
110
|
+
"ejs": {
|
|
111
|
+
"optional": true
|
|
112
|
+
},
|
|
113
|
+
"ioredis": {
|
|
114
|
+
"optional": true
|
|
115
|
+
},
|
|
116
|
+
"lightningcss": {
|
|
117
|
+
"optional": true
|
|
118
|
+
},
|
|
119
|
+
"postcss": {
|
|
120
|
+
"optional": true
|
|
121
|
+
},
|
|
122
|
+
"sharp": {
|
|
123
|
+
"optional": true
|
|
124
|
+
},
|
|
125
|
+
"tailwindcss": {
|
|
126
|
+
"optional": true
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"devDependencies": {
|
|
130
|
+
"@eslint/js": "^9",
|
|
131
|
+
"@types/express": "^5.0.6",
|
|
132
|
+
"@types/node": "^26.6.1",
|
|
133
|
+
"ejs": "^6.0.1",
|
|
134
|
+
"eslint": "^9",
|
|
135
|
+
"globals": "^16",
|
|
136
|
+
"typescript": "^7.0.2"
|
|
137
|
+
}
|
|
138
138
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `jskelet start` öncesi çalışır: build çıktısı yoksa üretir.
|
|
3
|
-
*
|
|
4
|
-
* Docker imajında build zaten yapıldığı için bu bir no-op; amaç `npm start`ı
|
|
5
|
-
* doğrudan çalıştıran birinin stilsiz bir sayfayla karşılaşmaması.
|
|
6
|
-
*/
|
|
7
|
-
import fs from "node:fs";
|
|
8
|
-
import path from "node:path";
|
|
9
|
-
import { loadConfig } from "../config/index.js";
|
|
10
|
-
|
|
11
|
-
const config = await loadConfig();
|
|
12
|
-
|
|
13
|
-
const generated = config.dirs.generated;
|
|
14
|
-
const needsAssets = !fs.existsSync(path.join(generated, "manifest.json"));
|
|
15
|
-
const needsTemplates = !fs.existsSync(path.join(generated, "templates", "manifest.json"));
|
|
16
|
-
|
|
17
|
-
if (needsAssets || needsTemplates) {
|
|
18
|
-
await import("./build.mjs");
|
|
19
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* `jskelet start` öncesi çalışır: build çıktısı yoksa üretir.
|
|
3
|
+
*
|
|
4
|
+
* Docker imajında build zaten yapıldığı için bu bir no-op; amaç `npm start`ı
|
|
5
|
+
* doğrudan çalıştıran birinin stilsiz bir sayfayla karşılaşmaması.
|
|
6
|
+
*/
|
|
7
|
+
import fs from "node:fs";
|
|
8
|
+
import path from "node:path";
|
|
9
|
+
import { loadConfig } from "../config/index.js";
|
|
10
|
+
|
|
11
|
+
const config = await loadConfig();
|
|
12
|
+
|
|
13
|
+
const generated = config.dirs.generated;
|
|
14
|
+
const needsAssets = !fs.existsSync(path.join(generated, "manifest.json"));
|
|
15
|
+
const needsTemplates = !fs.existsSync(path.join(generated, "templates", "manifest.json"));
|
|
16
|
+
|
|
17
|
+
if (needsAssets || needsTemplates) {
|
|
18
|
+
await import("./build.mjs");
|
|
19
|
+
}
|