rosetack 0.1.2 → 0.1.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/deploy/cloudflare/functions/[[path]].ts +61 -0
- package/deploy/cloudflare/wrangler.toml +14 -0
- package/deploy/netlify/functions/rosetack.ts +38 -0
- package/deploy/netlify.toml +17 -0
- package/devtools/devtools.html +7 -0
- package/devtools/devtools.js +1 -0
- package/devtools/manifest.json +8 -0
- package/devtools/panel.html +28 -0
- package/devtools/panel.js +54 -0
- package/dist-cli/compiler.mjs +2194 -561
- package/dist-cli/edge.mjs +159 -48
- package/dist-cli/rosetack.mjs +2899 -739
- package/dist-cli/runtime.mjs +305 -43
- package/dist-cli/test.mjs +2332 -630
- package/package.json +4 -3
- package/src/FRAMEWORK_VERSION +1 -1
- package/src/cli/content.ts +186 -0
- package/src/cli/edge.ts +78 -62
- package/src/cli/image-size.ts +83 -0
- package/src/cli/index.ts +391 -334
- package/src/cli/prod-server.ts +324 -0
- package/src/cli/prompt.ts +51 -20
- package/src/cli/shell.ts +105 -74
- package/src/cli/test.ts +9 -70
- package/src/compiler/index.ts +2107 -913
- package/src/runtime/index.ts +367 -168
- package/src/types/rosetack.d.ts +16 -66
- package/templates/admin/package.json +14 -0
- package/templates/admin/rosetack.config.js +1 -0
- package/templates/admin/src/pages/_middleware.rose +33 -0
- package/templates/admin/src/pages/api/items.rose +37 -0
- package/templates/admin/src/pages/api/login.rose +25 -0
- package/templates/admin/src/pages/index.rose +79 -0
- package/templates/api/package.json +14 -0
- package/templates/api/rosetack.config.js +1 -0
- package/templates/api/src/pages/api/health.rose +7 -0
- package/templates/api/src/pages/api/items.rose +46 -0
- package/templates/api/src/pages/api/login.rose +24 -0
- package/templates/api/src/pages/index.rose +25 -0
- package/templates/blog/package.json +14 -0
- package/templates/blog/rosetack.config.js +1 -0
- package/templates/blog/src/pages/404.rose +2 -0
- package/templates/blog/src/pages/_layout.rose +42 -0
- package/templates/blog/src/pages/_middleware.rose +74 -0
- package/templates/blog/src/pages/admin.rose +85 -0
- package/templates/blog/src/pages/api/login.rose +46 -0
- package/templates/blog/src/pages/api/posts/[id].rose +37 -0
- package/templates/blog/src/pages/api/posts.rose +72 -0
- package/templates/blog/src/pages/index.rose +31 -0
- package/templates/blog/src/pages/post/[id].rose +36 -0
- package/templates/site/package.json +14 -0
- package/templates/site/rosetack.config.js +1 -0
- package/templates/site/src/pages/404.rose +2 -0
- package/templates/site/src/pages/_layout.rose +40 -0
- package/templates/site/src/pages/about.rose +6 -0
- package/templates/site/src/pages/index.rose +13 -0
- package/templates/site/src/pages/pricing.rose +8 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
// The write page. Two forms, both progressive-enhancement honest:
|
|
3
|
+
//
|
|
4
|
+
// with JS - the submit handler fetch-POSTs to the api route and
|
|
5
|
+
// refresh()es the page in place: one request, no reload
|
|
6
|
+
// without JS - the form posts natively to the same api route; the
|
|
7
|
+
// cookie is set / the row is written, and the next visit
|
|
8
|
+
// shows the result
|
|
9
|
+
//
|
|
10
|
+
// The wall itself is NOT here: without a session the middleware loads
|
|
11
|
+
// no posts and the api refuses writes, so this page renders its login
|
|
12
|
+
// form and nothing else. `signedIn` below is UX only - it remembers in
|
|
13
|
+
// this tab that the login fetch succeeded, because an HttpOnly cookie
|
|
14
|
+
// is deliberately unreadable from JavaScript.
|
|
15
|
+
interface Post { id: number; title: string; body: string; author: string }
|
|
16
|
+
|
|
17
|
+
let signedIn = $state(false);
|
|
18
|
+
let error = $state('');
|
|
19
|
+
|
|
20
|
+
// Server render: the middleware's context. Client-side navigation: the
|
|
21
|
+
// same rows from the api (the honest cost of fresh server data after a
|
|
22
|
+
// SPA navigation - one request, exactly like the demo's /feed). The
|
|
23
|
+
// fetch is client-only: Node's fetch rejects a relative URL, and on the
|
|
24
|
+
// server the context is the answer.
|
|
25
|
+
let user = $data(async () => getContext().user ?? null);
|
|
26
|
+
let posts = $data(async (): Promise<Post[] | null> =>
|
|
27
|
+
getContext().posts ?? (signedIn() && typeof location !== 'undefined' ? (await (await fetch('/api/posts')).json()).posts : null));
|
|
28
|
+
|
|
29
|
+
async function login(e: SubmitEvent) {
|
|
30
|
+
e.preventDefault();
|
|
31
|
+
const form = e.target as HTMLFormElement;
|
|
32
|
+
const res = await fetch('/api/login', { method: 'POST', body: new FormData(form) });
|
|
33
|
+
if (res.ok) {
|
|
34
|
+
signedIn(true);
|
|
35
|
+
error('');
|
|
36
|
+
} else {
|
|
37
|
+
error('wrong user or password');
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
async function publish(e: SubmitEvent) {
|
|
42
|
+
e.preventDefault();
|
|
43
|
+
const form = e.target as HTMLFormElement;
|
|
44
|
+
const res = await fetch('/api/posts', { method: 'POST', body: new FormData(form) });
|
|
45
|
+
if (res.ok) {
|
|
46
|
+
error('');
|
|
47
|
+
form.reset();
|
|
48
|
+
await refresh();
|
|
49
|
+
} else {
|
|
50
|
+
error(await res.text());
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<h1>Write</h1>
|
|
56
|
+
|
|
57
|
+
{#if signedIn() || user()}
|
|
58
|
+
<p>Signed in. A new post is live the moment it is written - no rebuild.</p>
|
|
59
|
+
{#if error()}
|
|
60
|
+
<p><strong>{error()}</strong></p>
|
|
61
|
+
{/if}
|
|
62
|
+
<form on:submit={publish}>
|
|
63
|
+
<input name="title" placeholder="Title" aria-label="Title" required>
|
|
64
|
+
<textarea name="body" placeholder="Body" aria-label="Body" rows="4" required></textarea>
|
|
65
|
+
<button type="submit">Publish</button>
|
|
66
|
+
</form>
|
|
67
|
+
<h2>Published</h2>
|
|
68
|
+
<ul>
|
|
69
|
+
{#each posts() ?? [] as post}
|
|
70
|
+
<li><a href={'/post/' + post.id}>{post.title}</a></li>
|
|
71
|
+
{/each}
|
|
72
|
+
</ul>
|
|
73
|
+
{/if}
|
|
74
|
+
|
|
75
|
+
{#if !signedIn() && !user()}
|
|
76
|
+
<p>Sign in to write. The demo account is <code>ada</code> / <code>lovelace</code>.</p>
|
|
77
|
+
{#if error()}
|
|
78
|
+
<p><strong>{error()}</strong></p>
|
|
79
|
+
{/if}
|
|
80
|
+
<form method="POST" action="/api/login" on:submit={login}>
|
|
81
|
+
<input name="user" placeholder="User" aria-label="User" required>
|
|
82
|
+
<input name="pass" type="password" placeholder="Password" aria-label="Password" required>
|
|
83
|
+
<button type="submit">Sign in</button>
|
|
84
|
+
</form>
|
|
85
|
+
{/if}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { $sessionCookie } from './runtime.js';
|
|
3
|
+
import type { DatabaseSync } from 'node:sqlite';
|
|
4
|
+
|
|
5
|
+
// Login: POST user=ada pass=lovelace -> 200 + Set-Cookie: session=1.
|
|
6
|
+
// The cookie is what $sessionCookie() builds: HttpOnly, SameSite=Lax,
|
|
7
|
+
// Path=/, 7 days - the middleware and every write endpoint read it back
|
|
8
|
+
// with $cookies(request).
|
|
9
|
+
//
|
|
10
|
+
// Trade-off: plaintext passwords, one seeded row - a demo, not a vault.
|
|
11
|
+
// A real login hashes with node:crypto scrypt and compares in constant
|
|
12
|
+
// time; everything around it (this file, the cookie, the middleware)
|
|
13
|
+
// stays exactly as it is.
|
|
14
|
+
let conn: DatabaseSync | undefined;
|
|
15
|
+
const getDb = async () => {
|
|
16
|
+
if (!conn) {
|
|
17
|
+
const { DatabaseSync } = await import('node:sqlite');
|
|
18
|
+
conn = new DatabaseSync('blog.db');
|
|
19
|
+
conn.exec(`
|
|
20
|
+
CREATE TABLE IF NOT EXISTS users (
|
|
21
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
22
|
+
name TEXT NOT NULL UNIQUE,
|
|
23
|
+
pass TEXT NOT NULL
|
|
24
|
+
);
|
|
25
|
+
INSERT OR IGNORE INTO users (id, name, pass) VALUES (1, 'ada', 'lovelace');
|
|
26
|
+
`);
|
|
27
|
+
}
|
|
28
|
+
return conn;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const json = (obj: unknown, status = 200, headers: Record<string, string> = {}) =>
|
|
32
|
+
new Response(JSON.stringify(obj), { status, headers: { 'content-type': 'application/json', ...headers } });
|
|
33
|
+
|
|
34
|
+
export async function POST(req: Request) {
|
|
35
|
+
const form = await req.formData();
|
|
36
|
+
const db = await getDb();
|
|
37
|
+
const row = db.prepare('SELECT id FROM users WHERE name = ? AND pass = ?').get(String(form.get('user') ?? ''), String(form.get('pass') ?? '')) as { id: number } | undefined;
|
|
38
|
+
if (!row) return json({ error: 'bad credentials' }, 401);
|
|
39
|
+
return json({ ok: true }, 200, { 'set-cookie': $sessionCookie('session', String(row.id)) });
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Logout: expire the cookie (Max-Age=0).
|
|
43
|
+
export function DELETE() {
|
|
44
|
+
return json({ ok: true }, 200, { 'set-cookie': $sessionCookie('session', '', { maxAge: 0 }) });
|
|
45
|
+
}
|
|
46
|
+
</script>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import type { DatabaseSync } from 'node:sqlite';
|
|
3
|
+
|
|
4
|
+
// One post as JSON: GET /api/posts/2. The post page reads this on a
|
|
5
|
+
// client-side navigation (its server render gets the row from the
|
|
6
|
+
// middleware's context instead). Public: reading a post needs no
|
|
7
|
+
// session. The id is the last path segment.
|
|
8
|
+
let conn: DatabaseSync | undefined;
|
|
9
|
+
const getDb = async () => {
|
|
10
|
+
if (!conn) {
|
|
11
|
+
const { DatabaseSync } = await import('node:sqlite');
|
|
12
|
+
conn = new DatabaseSync('blog.db');
|
|
13
|
+
conn.exec(`
|
|
14
|
+
CREATE TABLE IF NOT EXISTS posts (
|
|
15
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
16
|
+
title TEXT NOT NULL,
|
|
17
|
+
body TEXT NOT NULL,
|
|
18
|
+
author TEXT NOT NULL DEFAULT 'anonymous'
|
|
19
|
+
);
|
|
20
|
+
`);
|
|
21
|
+
}
|
|
22
|
+
return conn;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
interface PostRow { id: number; title: string; body: string; author: string }
|
|
26
|
+
|
|
27
|
+
const json = (obj: unknown, status = 200) =>
|
|
28
|
+
new Response(JSON.stringify(obj), { status, headers: { 'content-type': 'application/json' } });
|
|
29
|
+
|
|
30
|
+
export async function GET(req: Request) {
|
|
31
|
+
const id = Number(new URL(req.url).pathname.split('/').pop());
|
|
32
|
+
const db = await getDb();
|
|
33
|
+
const post = db.prepare('SELECT id, title, body, author FROM posts WHERE id = ?').get(id) as PostRow | undefined;
|
|
34
|
+
if (!post) return json({ error: 'not found' }, 404);
|
|
35
|
+
return { post };
|
|
36
|
+
}
|
|
37
|
+
</script>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { $cookies } from './runtime.js';
|
|
3
|
+
import type { DatabaseSync } from 'node:sqlite';
|
|
4
|
+
|
|
5
|
+
// The blog's JSON api. GET is public; POST and DELETE need the session
|
|
6
|
+
// cookie the login route sets. The api namespace answers JSON only -
|
|
7
|
+
// never an HTML page - so a browser and a script get the same contract.
|
|
8
|
+
//
|
|
9
|
+
// node:sqlite is imported LAZILY, inside the accessor: a static import
|
|
10
|
+
// would put it in the server bundle's static graph, and the edge
|
|
11
|
+
// adapter loads that same bundle, so a node: built-in would boot-crash
|
|
12
|
+
// the whole app on an edge runtime instead of failing this one route.
|
|
13
|
+
// It also keeps `rosetack build` side-effect free (no database file is
|
|
14
|
+
// created at build time). One connection per worker process - that IS
|
|
15
|
+
// the pool; a Postgres deploy swaps this block for a pg.Pool.
|
|
16
|
+
let conn: DatabaseSync | undefined;
|
|
17
|
+
const getDb = async () => {
|
|
18
|
+
if (!conn) {
|
|
19
|
+
const { DatabaseSync } = await import('node:sqlite');
|
|
20
|
+
conn = new DatabaseSync('blog.db');
|
|
21
|
+
conn.exec(`
|
|
22
|
+
CREATE TABLE IF NOT EXISTS posts (
|
|
23
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
24
|
+
title TEXT NOT NULL,
|
|
25
|
+
body TEXT NOT NULL,
|
|
26
|
+
author TEXT NOT NULL DEFAULT 'anonymous'
|
|
27
|
+
);
|
|
28
|
+
`);
|
|
29
|
+
}
|
|
30
|
+
return conn;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
interface PostRow { id: number; title: string; body: string; author: string }
|
|
34
|
+
|
|
35
|
+
const json = (obj: unknown, status = 200) =>
|
|
36
|
+
new Response(JSON.stringify(obj), { status, headers: { 'content-type': 'application/json' } });
|
|
37
|
+
|
|
38
|
+
const signedIn = (req: Request) => $cookies(req).session === '1';
|
|
39
|
+
|
|
40
|
+
// The list, newest first. The pages read the same rows through the
|
|
41
|
+
// middleware on a server render, and through this endpoint on a
|
|
42
|
+
// client-side navigation.
|
|
43
|
+
export async function GET() {
|
|
44
|
+
const db = await getDb();
|
|
45
|
+
const posts = db.prepare('SELECT id, title, body, author FROM posts ORDER BY id DESC').all() as unknown as PostRow[];
|
|
46
|
+
return { posts };
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Create. 401 without a session, 400 without both fields, 201 with the
|
|
50
|
+
// new id. The CSRF guard on `rosetack serve` has already refused
|
|
51
|
+
// cross-site writes before this handler runs.
|
|
52
|
+
export async function POST(req: Request) {
|
|
53
|
+
if (!signedIn(req)) return json({ error: 'sign in first' }, 401);
|
|
54
|
+
const form = await req.formData();
|
|
55
|
+
const title = String(form.get('title') ?? '').trim();
|
|
56
|
+
const body = String(form.get('body') ?? '').trim();
|
|
57
|
+
if (!title || !body) return json({ error: 'title and body are required' }, 400);
|
|
58
|
+
const db = await getDb();
|
|
59
|
+
const info = db.prepare('INSERT INTO posts (title, body, author) VALUES (?, ?, ?)').run(title, body, 'ada');
|
|
60
|
+
return json({ id: Number(info.lastInsertRowid) }, 201);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Delete by ?id=. Same wall as POST.
|
|
64
|
+
export async function DELETE(req: Request) {
|
|
65
|
+
if (!signedIn(req)) return json({ error: 'sign in first' }, 401);
|
|
66
|
+
const id = Number(new URL(req.url).searchParams.get('id'));
|
|
67
|
+
if (!id) return json({ error: 'id is required' }, 400);
|
|
68
|
+
const db = await getDb();
|
|
69
|
+
db.prepare('DELETE FROM posts WHERE id = ?').run(id);
|
|
70
|
+
return json({ deleted: id });
|
|
71
|
+
}
|
|
72
|
+
</script>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
// The list page. $data runs per request on the server and reads the
|
|
3
|
+
// rows the middleware already loaded - so the page itself imports
|
|
4
|
+
// nothing, and the first response carries the data.
|
|
5
|
+
//
|
|
6
|
+
// The page has no event wiring, no form and no lifecycle: the compiler
|
|
7
|
+
// decides this route is zero-JS . The list ships as
|
|
8
|
+
// pure HTML - no state script, no bundle, zero script tags.
|
|
9
|
+
//
|
|
10
|
+
// On a client-side navigation the context is empty (it is a
|
|
11
|
+
// per-request, server-side bag), so the same $data falls back to the
|
|
12
|
+
// api: one request for fresh rows, the honest cost of server data
|
|
13
|
+
// after a SPA navigation. The fallback is CLIENT-only on purpose -
|
|
14
|
+
// Node's fetch rejects a relative URL, and on the server the context
|
|
15
|
+
// (or an empty list) is already the answer.
|
|
16
|
+
interface Post { id: number; title: string; body: string; author: string }
|
|
17
|
+
|
|
18
|
+
let posts = $data(async (): Promise<Post[]> =>
|
|
19
|
+
getContext().posts ?? (typeof location === 'undefined' ? [] : (await (await fetch('/api/posts')).json()).posts));
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<h1>Posts</h1>
|
|
23
|
+
<p>Every row below arrived in the first response - one request, no JavaScript.</p>
|
|
24
|
+
<ul>
|
|
25
|
+
{#each posts() as post}
|
|
26
|
+
<li>
|
|
27
|
+
<a href={'/post/' + post.id}>{post.title}</a>
|
|
28
|
+
<span> — {post.author}</span>
|
|
29
|
+
</li>
|
|
30
|
+
{/each}
|
|
31
|
+
</ul>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
// A single post. The server render gets the row from the middleware's
|
|
3
|
+
// context; a client-side navigation fetches it from the api by the
|
|
4
|
+
// same id the router put in the URL. `id` is the route's param state -
|
|
5
|
+
// the router fills it from the pathname before this $data runs.
|
|
6
|
+
//
|
|
7
|
+
// The api fallback is CLIENT-only: Node's fetch rejects a relative URL,
|
|
8
|
+
// and on the server the context (or null -> the not-found branch) is
|
|
9
|
+
// already the answer.
|
|
10
|
+
//
|
|
11
|
+
// Because the row is per-request data (it changes the moment someone
|
|
12
|
+
// writes a post), the compiler keeps this route dynamic: never baked,
|
|
13
|
+
// always rendered live.
|
|
14
|
+
interface Post { id: number; title: string; body: string; author: string }
|
|
15
|
+
|
|
16
|
+
let id = $state('1');
|
|
17
|
+
let post = $data(async (): Promise<Post | null> =>
|
|
18
|
+
getContext().post ?? (typeof location === 'undefined' ? null : (await (await fetch('/api/posts/' + id())).json()).post ?? null));
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<head>
|
|
22
|
+
<title>{post() ? post()!.title : 'Not found'} - Rosevine</title>
|
|
23
|
+
</head>
|
|
24
|
+
|
|
25
|
+
{#if post()}
|
|
26
|
+
<article>
|
|
27
|
+
<h1>{post()!.title}</h1>
|
|
28
|
+
<p>{post()!.body}</p>
|
|
29
|
+
<p><small>by {post()!.author}</small></p>
|
|
30
|
+
</article>
|
|
31
|
+
{/if}
|
|
32
|
+
{#if !post()}
|
|
33
|
+
<h1>Not found</h1>
|
|
34
|
+
<p>No post with that id.</p>
|
|
35
|
+
{/if}
|
|
36
|
+
<p><a href="/">Back to all posts</a></p>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rosetack-site",
|
|
3
|
+
"private": true,
|
|
4
|
+
"type": "module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "rosetack dev",
|
|
7
|
+
"build": "rosetack build",
|
|
8
|
+
"preview": "rosetack preview",
|
|
9
|
+
"serve": "rosetack serve"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"rosetack": "latest"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default [];
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
// The layout wraps every page: the <head>, the nav and the footer live
|
|
3
|
+
// here once. `links` is ordinary state - the nav is one {#each} over it.
|
|
4
|
+
let links = $state([
|
|
5
|
+
{ href: '/', label: 'Home' },
|
|
6
|
+
{ href: '/pricing', label: 'Pricing' },
|
|
7
|
+
{ href: '/about', label: 'About' },
|
|
8
|
+
]);
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<style>
|
|
12
|
+
/* Scoped to this file: the build rewrites every selector with this
|
|
13
|
+
component's scope key, and the CSS is inlined into the document -
|
|
14
|
+
zero stylesheet requests. */
|
|
15
|
+
.shell { max-width: 46rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; font-family: system-ui, sans-serif; }
|
|
16
|
+
.nav a { margin-right: 1rem; }
|
|
17
|
+
.foot { margin-top: 3rem; color: #888; font-size: 0.85rem; }
|
|
18
|
+
</style>
|
|
19
|
+
|
|
20
|
+
<head>
|
|
21
|
+
<title>Rosevine — the site template</title>
|
|
22
|
+
<meta name="description" content="A content site built with rosetack: every page ships zero JavaScript.">
|
|
23
|
+
</head>
|
|
24
|
+
|
|
25
|
+
<div class="shell">
|
|
26
|
+
<header class="nav">
|
|
27
|
+
<strong>🌹 Rosevine</strong>
|
|
28
|
+
<nav>
|
|
29
|
+
{#each links() as link}
|
|
30
|
+
<a href={link.href}>{link.label}</a>
|
|
31
|
+
{/each}
|
|
32
|
+
</nav>
|
|
33
|
+
</header>
|
|
34
|
+
<main>
|
|
35
|
+
<slot />
|
|
36
|
+
</main>
|
|
37
|
+
<footer class="foot">
|
|
38
|
+
Built with rosetack — every page on this site ships zero JavaScript.
|
|
39
|
+
</footer>
|
|
40
|
+
</div>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<h1>Ship the site, not the runtime.</h1>
|
|
2
|
+
<p>
|
|
3
|
+
Every page in this template is pure HTML: no bundle, no state script, zero
|
|
4
|
+
script tags. The compiler decides that per route — nothing is exported, and
|
|
5
|
+
nothing is shipped. A content site's whole JavaScript budget is zero bytes.
|
|
6
|
+
</p>
|
|
7
|
+
<h2>What you get</h2>
|
|
8
|
+
<ul>
|
|
9
|
+
<li>One request per page — the document is the whole answer</li>
|
|
10
|
+
<li>Scoped styles inlined into the document — zero stylesheet requests</li>
|
|
11
|
+
<li>A build that bakes every route, so any static host can serve it</li>
|
|
12
|
+
</ul>
|
|
13
|
+
<p><a href="/pricing">See the pricing</a> or <a href="/about">read the story</a>.</p>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<h1>Pricing</h1>
|
|
2
|
+
<p>Three tiers, because every template needs a pricing table.</p>
|
|
3
|
+
<ul>
|
|
4
|
+
<li><strong>Free</strong> — the whole framework, the whole site, zero dollars</li>
|
|
5
|
+
<li><strong>Team</strong> — the same thing, with more people</li>
|
|
6
|
+
<li><strong>Enterprise</strong> — the same thing, with a invoice</li>
|
|
7
|
+
</ul>
|
|
8
|
+
<p><a href="/">Back home</a></p>
|