create-thexjs-app 1.1.0 → 1.1.2

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/dist/index.js CHANGED
@@ -2,7 +2,15 @@
2
2
 
3
3
  // src/index.ts
4
4
  import { spawnSync } from "child_process";
5
- import { cpSync, existsSync, mkdirSync, readdirSync, statSync, writeFileSync } from "fs";
5
+ import {
6
+ cpSync,
7
+ existsSync,
8
+ mkdirSync,
9
+ readdirSync,
10
+ renameSync,
11
+ statSync,
12
+ writeFileSync
13
+ } from "fs";
6
14
  import { dirname, join, resolve } from "path";
7
15
  import { fileURLToPath } from "url";
8
16
  import {
@@ -71,6 +79,7 @@ var BASE_DEPENDENCIES = {
71
79
  "react-dom": "^19.1.0"
72
80
  };
73
81
  var BASE_DEV_DEPENDENCIES = {
82
+ "@types/bun": "latest",
74
83
  "@types/react": "^19.1.0",
75
84
  "@types/react-dom": "^19.1.0",
76
85
  typescript: "^5.8.0"
@@ -85,7 +94,7 @@ var __dirname = dirname(fileURLToPath(import.meta.url));
85
94
  var TEMPLATES_ROOT = join(__dirname, "..", "templates");
86
95
  var BASE_TEMPLATE = join(TEMPLATES_ROOT, "base");
87
96
  var ADDONS_ROOT = join(TEMPLATES_ROOT, "addons");
88
- var FALLBACK_CORE_VERSION = "0.1.0";
97
+ var FALLBACK_CORE_VERSION = "1.2.2";
89
98
  function parseArgs(argv) {
90
99
  const options = {
91
100
  features: [],
@@ -175,6 +184,12 @@ function copyAddon(addon, targetDir) {
175
184
  if (!existsSync(src)) return;
176
185
  mergeTree(src, targetDir);
177
186
  }
187
+ function finalizeGitignore(targetDir) {
188
+ const from = join(targetDir, "_gitignore");
189
+ if (!existsSync(from)) return;
190
+ const to = join(targetDir, ".gitignore");
191
+ renameSync(from, to);
192
+ }
178
193
  function buildPackageJson(name, features, coreVersion, cliVersion) {
179
194
  const dependencies = {
180
195
  ...BASE_DEPENDENCIES,
@@ -278,6 +293,7 @@ async function main() {
278
293
  spin.start(`Scaffolding "${slug}"`);
279
294
  ensureDir(targetDir);
280
295
  mergeTree(BASE_TEMPLATE, targetDir);
296
+ finalizeGitignore(targetDir);
281
297
  for (const feature of features) {
282
298
  copyAddon(feature, targetDir);
283
299
  }
@@ -292,10 +308,13 @@ async function main() {
292
308
  spin.stop(`Created ${slug}/`);
293
309
  if (options.git) {
294
310
  const initSpin = spinner();
295
- initSpin.start("Initializing git repository");
296
- const result = spawnSync("git", ["init", "-q"], { cwd: targetDir, stdio: "ignore" });
311
+ initSpin.start("Initializing git repository (main branch)");
312
+ const result = spawnSync("git", ["init", "-q", "-b", "main"], {
313
+ cwd: targetDir,
314
+ stdio: "ignore"
315
+ });
297
316
  if (result.status === 0) {
298
- initSpin.stop("Git repository initialized");
317
+ initSpin.stop("Git repository initialized on main");
299
318
  } else {
300
319
  initSpin.stop("Git could not be initialized (is git installed?)");
301
320
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-thexjs-app",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Scaffold a new x framework app (npm create thexjs-app@latest).",
5
5
  "keywords": [
6
6
  "react",
@@ -1,11 +1,11 @@
1
1
  @import "tailwindcss";
2
2
 
3
3
  @theme inline {
4
- --color-background: var(--background);
5
- --color-foreground: var(--foreground);
6
- --color-muted: var(--muted);
7
- --color-muted-foreground: var(--muted-foreground);
8
- --color-border: var(--border);
4
+ --color-background: rgb(var(--background));
5
+ --color-foreground: rgb(var(--foreground));
6
+ --color-muted: rgb(var(--muted));
7
+ --color-muted-foreground: rgb(var(--muted-foreground));
8
+ --color-border: rgb(var(--border));
9
9
  }
10
10
 
11
11
  :root {
@@ -0,0 +1,26 @@
1
+ # Dependencies
2
+ node_modules/
3
+
4
+ # Build output
5
+ .x/
6
+ dist/
7
+
8
+ # Runtime data (SQLite, uploads)
9
+ data/
10
+ *.db
11
+ *.db-journal
12
+
13
+ # Env
14
+ .env
15
+ .env.local
16
+ .env.*.local
17
+
18
+ # Compiled styles
19
+ public/styles.css
20
+
21
+ # Vercel
22
+ .vercel/
23
+
24
+ # Misc
25
+ .DS_Store
26
+ *.log
@@ -0,0 +1,27 @@
1
+ export default function About() {
2
+ return (
3
+ <main style={{ maxWidth: 680, margin: "0 auto", padding: "5rem 1.5rem" }}>
4
+ <p style={{ fontWeight: 700, letterSpacing: "0.08em", color: "#e8942f" }}>THE X FRAMEWORK</p>
5
+ <h1 style={{ fontSize: "2.6rem", lineHeight: 1.1, margin: "0.5rem 0" }}>About</h1>
6
+ <p style={{ fontSize: "1.15rem", lineHeight: 1.6, color: "#64748b" }}>
7
+ x is a full-stack React framework built natively on Bun. File-based routing, server
8
+ functions, ISR, and content collections — all from <code>src/pages</code>.
9
+ </p>
10
+ <div style={{ display: "flex", gap: "0.75rem", marginTop: "2rem" }}>
11
+ <a href="/" style={btn}>
12
+ &larr; Back home
13
+ </a>
14
+ </div>
15
+ </main>
16
+ );
17
+ }
18
+
19
+ const btn: React.CSSProperties = {
20
+ display: "inline-block",
21
+ background: "#0f172a",
22
+ color: "#fff",
23
+ padding: "0.7rem 1.2rem",
24
+ borderRadius: 999,
25
+ textDecoration: "none",
26
+ fontWeight: 600,
27
+ };