create-volt 0.39.0 → 0.39.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/CHANGELOG.md CHANGED
@@ -4,6 +4,16 @@ All notable changes to `create-volt` are documented here. The format follows
4
4
  [Keep a Changelog](https://keepachangelog.com/), and this project adheres to
5
5
  [Semantic Versioning](https://semver.org/).
6
6
 
7
+ ## [0.39.1] - 2026-06-30
8
+
9
+ ### Fixed
10
+ - **Scaffolding was broken in 0.37.0–0.39.0.** The bundled `themes/` dir is
11
+ copied into new apps, but it was never added to the package `files`, so it was
12
+ missing from the npm tarball and `npm create volt` crashed with
13
+ `ENOENT … create-volt/themes`. Added `themes` to `files`, and guarded the
14
+ bundled-dir copy (`addons`/`themes`) so a missing dir is skipped, never fatal.
15
+ Verified by scaffolding from the packed tarball.
16
+
7
17
  ## [0.39.0] - 2026-06-29
8
18
 
9
19
  ### Fixed
@@ -518,6 +528,7 @@ All notable changes to `create-volt` are documented here. The format follows
518
528
  watching and full-page hot reload. Supports `--skip-install` and `--force`,
519
529
  and auto-detects npm / pnpm / yarn / bun for the install step.
520
530
 
531
+ [0.39.1]: https://github.com/MIR-2025/volt/releases/tag/v0.39.1
521
532
  [0.39.0]: https://github.com/MIR-2025/volt/releases/tag/v0.39.0
522
533
  [0.38.0]: https://github.com/MIR-2025/volt/releases/tag/v0.38.0
523
534
  [0.37.0]: https://github.com/MIR-2025/volt/releases/tag/v0.37.0
package/index.js CHANGED
@@ -465,8 +465,12 @@ if (fs.existsSync(shippedDockerignore)) {
465
465
  // Bundle the add-on sources so the app's setup wizard can enable them later
466
466
  // (only for templates that ship the wizard, i.e. have a setup/ dir).
467
467
  if (fs.existsSync(path.join(targetDir, "setup"))) {
468
- fs.cpSync(path.join(__dirname, "addons"), path.join(targetDir, ".volt", "addons"), { recursive: true });
469
- fs.cpSync(path.join(__dirname, "themes"), path.join(targetDir, ".volt", "themes"), { recursive: true }); // bundled themes the wizard can pick
468
+ // copy each bundled dir into .volt/ guard existsSync so a missing dir (e.g.
469
+ // an incomplete install) is skipped rather than crashing the scaffold.
470
+ for (const name of ["addons", "themes"]) {
471
+ const src = path.join(__dirname, name);
472
+ if (fs.existsSync(src)) fs.cpSync(src, path.join(targetDir, ".volt", name), { recursive: true });
473
+ }
470
474
  }
471
475
 
472
476
  // --- stamp the project name into package.json ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-volt",
3
- "version": "0.39.0",
3
+ "version": "0.39.1",
4
4
  "description": "Scaffold a new Volt app — no-build, signals-based UI with Socket.io hot reload.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -11,6 +11,7 @@
11
11
  "lib",
12
12
  "templates",
13
13
  "addons",
14
+ "themes",
14
15
  "CHANGELOG.md"
15
16
  ],
16
17
  "engines": {
@@ -0,0 +1,28 @@
1
+ // volt-theme-classic — a structured site theme: top nav bar + card content.
2
+ const NAME = process.env.SITE_NAME || "Home";
3
+
4
+ export const css = `:root{--ink:#1f2329;--bg:#f4f5f7;--card:#fff;--accent:#2557d6;--muted:#5b6573;--line:#e2e5ea}
5
+ *{box-sizing:border-box}
6
+ body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.7 system-ui,sans-serif}
7
+ header.site{background:var(--card);border-bottom:1px solid var(--line)}
8
+ header.site .bar{display:flex;align-items:center;gap:1rem;max-width:840px;margin:0 auto;padding:.9rem 1.2rem}
9
+ header.site a.brand{font-weight:800;color:var(--ink);text-decoration:none;font-size:1.15rem}
10
+ header.site nav{margin-left:auto}
11
+ header.site nav a{color:var(--muted);text-decoration:none;margin-left:1rem}
12
+ header.site nav a:hover{color:var(--accent)}
13
+ main .card{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:2rem;max-width:840px;margin:2rem auto}
14
+ h1,h2,h3{line-height:1.25}
15
+ a{color:var(--accent)}
16
+ pre{background:#0b0d11;color:#cfe3ff;padding:1rem;border-radius:8px;overflow:auto}
17
+ :not(pre)>code{background:#eef1f5;padding:.1em .35em;border-radius:5px}
18
+ img{max-width:100%}
19
+ footer.site{text-align:center;color:var(--muted);font-size:.9rem;padding:2rem 1rem}`;
20
+
21
+ export function layout({ title, head, content }) {
22
+ return `<!doctype html><html lang="en"><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
23
+ <title>${title}</title>${head}<link rel="stylesheet" href="/_theme.css" /></head><body>
24
+ <header class="site"><div class="bar"><a class="brand" href="/">${NAME}</a><nav><a href="/">Home</a></nav></div></header>
25
+ <main><div class="card">${content}</div></main>
26
+ <footer class="site">${NAME} — built with Volt</footer>
27
+ </body></html>`;
28
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "description": "Volt theme: Classic — a structured site with a top nav bar and card content."
3
+ }
@@ -0,0 +1,27 @@
1
+ // volt-theme-midnight — a dark, modern, sans-serif theme.
2
+ const NAME = process.env.SITE_NAME || "Home";
3
+
4
+ export const css = `:root{--ink:#e6e8ee;--bg:#0e1116;--accent:#7c9cff;--muted:#9aa4b2;--line:#222831}
5
+ *{box-sizing:border-box}
6
+ body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.7 system-ui,-apple-system,sans-serif}
7
+ .wrap{max-width:760px;margin:0 auto;padding:0 1.2rem}
8
+ header.site{position:sticky;top:0;background:rgba(14,17,22,.85);backdrop-filter:blur(6px);border-bottom:1px solid var(--line);padding:.9rem 0}
9
+ header.site a{color:var(--accent);font-weight:800;text-decoration:none;letter-spacing:-.02em}
10
+ main{padding:2rem 0 3rem}
11
+ h1,h2,h3{line-height:1.2;letter-spacing:-.01em}
12
+ a{color:var(--accent)}
13
+ pre{background:#0a0d12;border:1px solid var(--line);padding:1rem;border-radius:10px;overflow:auto;color:#cfe3ff}
14
+ :not(pre)>code{background:rgba(124,156,255,.15);padding:.1em .35em;border-radius:5px;color:var(--accent)}
15
+ blockquote{border-left:3px solid var(--accent);margin:1.2rem 0;padding:.2rem 1rem;color:var(--muted)}
16
+ img{max-width:100%;border-radius:10px}
17
+ table{border-collapse:collapse;width:100%}td,th{border:1px solid var(--line);padding:.5rem .7rem}
18
+ footer.site{border-top:1px solid var(--line);margin-top:3rem;padding:1.5rem 0;color:var(--muted);font-size:.9rem}`;
19
+
20
+ export function layout({ title, head, content }) {
21
+ return `<!doctype html><html lang="en"><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
22
+ <title>${title}</title>${head}<link rel="stylesheet" href="/_theme.css" /></head><body>
23
+ <header class="site"><div class="wrap"><a href="/">${NAME}</a></div></header>
24
+ <main><div class="wrap">${content}</div></main>
25
+ <footer class="site"><div class="wrap">${NAME} — built with Volt</div></footer>
26
+ </body></html>`;
27
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "description": "Volt theme: Midnight — dark, modern, sans-serif with a sticky header."
3
+ }
@@ -0,0 +1,26 @@
1
+ // volt-theme-paper — a light, serif, reading-focused theme.
2
+ const NAME = process.env.SITE_NAME || "Home";
3
+
4
+ export const css = `:root{--ink:#222;--bg:#fbfaf7;--accent:#9a3b2e;--muted:#6b6b6b}
5
+ *{box-sizing:border-box}
6
+ body{margin:0;background:var(--bg);color:var(--ink);font:18px/1.75 Georgia,"Times New Roman",serif}
7
+ .wrap{max-width:680px;margin:0 auto;padding:0 1.2rem}
8
+ header.site{padding:2rem 0 1rem;border-bottom:1px solid #e7e3da}
9
+ header.site a{color:var(--ink);text-decoration:none;font-weight:700;font-size:1.3rem}
10
+ main{padding:2rem 0 3rem}
11
+ h1,h2,h3{font-weight:700;line-height:1.2}
12
+ a{color:var(--accent)}
13
+ pre{background:#f1ede4;padding:1rem;border-radius:6px;overflow:auto;font:14px/1.5 ui-monospace,monospace}
14
+ :not(pre)>code{background:#f1ede4;padding:.1em .35em;border-radius:4px;font-size:.9em}
15
+ blockquote{border-left:3px solid var(--accent);margin:1.5rem 0;padding:.2rem 1.2rem;color:var(--muted);font-style:italic}
16
+ img{max-width:100%;border-radius:6px}
17
+ footer.site{border-top:1px solid #e7e3da;margin-top:3rem;padding:1.5rem 0;color:var(--muted);font-size:.9rem}`;
18
+
19
+ export function layout({ title, head, content }) {
20
+ return `<!doctype html><html lang="en"><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
21
+ <title>${title}</title>${head}<link rel="stylesheet" href="/_theme.css" /></head><body>
22
+ <header class="site"><div class="wrap"><a href="/">${NAME}</a></div></header>
23
+ <main><div class="wrap">${content}</div></main>
24
+ <footer class="site"><div class="wrap">${NAME} — built with Volt</div></footer>
25
+ </body></html>`;
26
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "description": "Volt theme: Paper — light, serif, reading-focused (blogs, essays, docs)."
3
+ }