@krantho/node 0.0.0-stage → 1.0.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/LICENSE +21 -0
- package/README.md +52 -2
- package/package.json +20 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Descoped
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,53 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @krantho/node
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
One-install convenience bundle for building a krantho site with **Vite / Express
|
|
4
|
+
/ Node**.
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
pnpm add @krantho/node @krantho/ui-react
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
This bundle deliberately does **not** include a UI library — pick one yourself
|
|
11
|
+
(`@krantho/ui-react`, `@krantho/ui-svelte`, `@krantho/ui-mui`, or
|
|
12
|
+
`@krantho/ui-tailwind`). Everything else a typical Node project needs is included:
|
|
13
|
+
|
|
14
|
+
| Bundled package | Role |
|
|
15
|
+
|-----------------|------|
|
|
16
|
+
| `@krantho/server-node` | Vite / Express / Node adapter |
|
|
17
|
+
| `@krantho/studio` | Studio SPA (served at `/studio`) |
|
|
18
|
+
| `@krantho/media-local` | Local disk file store for media (`media.provider: 'local'`) |
|
|
19
|
+
| `@krantho/seo` | Schema.org archetypes, JSON-LD, rich result tooling |
|
|
20
|
+
|
|
21
|
+
The content engine, schema system, API, and SQLite/filesystem persistence come in
|
|
22
|
+
transitively through `@krantho/server-node`.
|
|
23
|
+
|
|
24
|
+
This is a **dependency-only** package — it has no runtime code of its own. Import
|
|
25
|
+
APIs from the underlying packages directly:
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import { createHandler } from '@krantho/server-node'
|
|
29
|
+
import { composeFromConfig } from '@krantho/seo'
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Under a strict, non-hoisted `node_modules` layout (pnpm's default) a transitive
|
|
33
|
+
dependency cannot be imported by name. List the packages your code imports —
|
|
34
|
+
typically `@krantho/config`, `@krantho/schema` and `@krantho/server-node` — as direct
|
|
35
|
+
dependencies too.
|
|
36
|
+
|
|
37
|
+
## SEO is included but opt-in
|
|
38
|
+
|
|
39
|
+
`@krantho/seo` is installed but only activated when `krantho.config.ts` carries a
|
|
40
|
+
`seo` block. Zero overhead if unused.
|
|
41
|
+
|
|
42
|
+
## Postgres
|
|
43
|
+
|
|
44
|
+
The default persistence is SQLite. For Postgres, add the adapter and driver:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pnpm add @krantho/node @krantho/persistence-postgres postgres
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Prefer modular installs?
|
|
51
|
+
|
|
52
|
+
The bundle exists for a fast start. Power users can install the individual
|
|
53
|
+
packages (`@krantho/server-node`, …) and swap any piece.
|
package/package.json
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krantho/node",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "One-install krantho bundle for Vite / Express / Node — server adapter, Studio, media, and SEO. Pick a UI library separately.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://krantho.com",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/descoped/krantho.git",
|
|
10
|
+
"directory": "packages/node"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/descoped/krantho/issues"
|
|
14
|
+
},
|
|
15
|
+
"author": "oranheim",
|
|
16
|
+
"type": "module",
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@krantho/server-node": "1.0.0",
|
|
19
|
+
"@krantho/studio": "1.0.0",
|
|
20
|
+
"@krantho/media-local": "1.0.0",
|
|
21
|
+
"@krantho/seo": "1.0.0"
|
|
22
|
+
}
|
|
6
23
|
}
|