@jxsuite/create 1.3.6 → 1.3.8

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/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # `@jxsuite/create`
2
2
 
3
- > Project scaffolder for Jx — the package behind `bun create @jxsuite`.
3
+ > Project scaffolder for Jx, the package behind `bun create @jxsuite`.
4
4
 
5
5
  ## Overview
6
6
 
7
7
  `@jxsuite/create` turns an empty directory into a working Jx project. It is two things at once: an
8
8
  interactive CLI, and the library whose `generateProject()` is the single generation engine shared by
9
- every creation surface in the monorepo — the CLI imports it directly, and the dev server's Studio
9
+ every creation surface in the monorepo. The CLI imports it directly, and the dev server's Studio
10
10
  API and the packaged desktop backend dynamic-import it (`packages/server/src/studio-api.ts`,
11
11
  `packages/desktop/src/project-session.ts`).
12
12
 
@@ -22,16 +22,16 @@ bun create @jxsuite <directory> [--template <id>]
22
22
 
23
23
  The first argument that is not part of `--template` is the destination directory; it is required (a
24
24
  bare invocation prints usage and exits 1). `--template <id>` and `--template=<id>` are both accepted,
25
- and no other flag is recognized — an unrecognized one is taken as the destination.
25
+ and no other flag is recognized. An unrecognized one is taken as the destination.
26
26
 
27
- Prompts, in order — everything except the destination is asked interactively:
27
+ Everything except the destination is asked interactively. The prompts, in order:
28
28
 
29
29
  | Prompt | Default when blank |
30
30
  | ---------------------------------------- | ----------------------------------------------------- |
31
31
  | `Project name (<dir>): ` | basename of the destination directory |
32
32
  | `Description: ` | `""` |
33
- | `Production URL (https://example.com): ` | `""` — `generateProject` writes `https://example.com` |
34
- | `Template [1]: ` | Blank — skipped entirely when `--template` is given |
33
+ | `Production URL (https://example.com): ` | `""` (`generateProject` writes `https://example.com`) |
34
+ | `Template [1]: ` | Blank (skipped entirely when `--template` is given) |
35
35
  | `Adapter [1]: ` | `static` |
36
36
 
37
37
  The template menu numbers the four built-in templates 1-4, then the starters from
@@ -42,7 +42,7 @@ default.
42
42
  ## Templates and starters
43
43
 
44
44
  Two disjoint id namespaces feed `--template`. A **built-in template id wins**; otherwise a starter id
45
- is matched; an id in neither namespace **silently falls back to blank** rather than erroring.
45
+ is matched; an id in neither namespace **silently falls back to blank** instead of erroring.
46
46
 
47
47
  | Built-in id | What it produces |
48
48
  | --------------- | ------------------------------------------------------------------------------------- |
@@ -51,22 +51,22 @@ is matched; an id in neither namespace **silently falls back to blank** rather t
51
51
  | `mobile-first` | Same files, mobile-first `$media` (min-width queries, 375px base) |
52
52
  | `mobile-app` | Mobile-first `$media`, `viewport-fit=cover`, a `theme-color` meta, and a file overlay |
53
53
 
54
- `template/` (singular) is the shared skeleton copied on every non-starter scaffold — `gitignore` →
54
+ `template/` (singular) is the shared skeleton copied on every non-starter scaffold: `gitignore` →
55
55
  `.gitignore`, `layouts/`, `pages/`. `templates/` (plural) holds per-template overlay trees copied
56
56
  **after** the skeleton with `force: true`, and today contains exactly one: `mobile-app/`, which
57
57
  replaces `layouts/base.json` with an app shell (bottom nav bar, safe-area insets) and
58
58
  `pages/index.md` with an app-flavored home page, and adds `pages/explore.md` and
59
59
  `pages/profile.md`. So `blank`, `desktop-first` and `mobile-first` differ only in the generated
60
- `project.json` — zero file differences. Breakpoint maps live in `templates.ts`
60
+ `project.json` (zero file differences). Breakpoint maps live in `templates.ts`
61
61
  (`mediaForTemplate`).
62
62
 
63
- Starter ids come from [`@jxsuite/starters`](../starters/README.md) — its `registry.json` is the
63
+ Starter ids come from [`@jxsuite/starters`](../starters/README.md). Its `registry.json` is the
64
64
  current list. A starter clone copies the starter tree verbatim except `node_modules`, `dist`,
65
65
  `.cache`, `.jx-cache`, `.git`, and `images.json`, then re-stamps `project.json` in place: `name`
66
66
  always, `url` only when non-empty, `build.adapter` only when the adapter is not `static`, and the
67
67
  `<meta name="description">` content only when a description was given. The starter's design tokens,
68
- content collections, image pipeline, and the rest of `$head` survive; its `package.json` does not —
69
- it is rebuilt from scratch (see below).
68
+ content collections, image pipeline, and the rest of `$head` survive; its `package.json` does not,
69
+ because it is rebuilt from scratch (see below).
70
70
 
71
71
  ## What gets generated
72
72
 
@@ -98,7 +98,7 @@ await generateProject("/abs/path/to/my-site", {
98
98
  });
99
99
  ```
100
100
 
101
- `design` (optional) applies a colors/fonts/logo/breakpoints quickstart on top of the scaffold — see
101
+ `design` (optional) applies a colors/fonts/logo/breakpoints quickstart on top of the scaffold. See
102
102
  `DesignOptions` in `generate.ts`.
103
103
 
104
104
  | Export | Description |
@@ -110,13 +110,13 @@ await generateProject("/abs/path/to/my-site", {
110
110
 
111
111
  `scaffold.ts` has **zero node imports** by design, so it runs in a browser and against a Git Data
112
112
  API. `@jxsuite/studio` imports `updateWranglerConfig` for its Cloudflare Pages publish flow, and
113
- `@jxsuite/compiler` imports `applyBindingFragments` for `jx db push` — adding `node:fs` there breaks
113
+ `@jxsuite/compiler` imports `applyBindingFragments` for `jx db push`. Adding `node:fs` there breaks
114
114
  both. `isTemplateId` is used server-side as request validation: the Studio API rejects an unknown
115
115
  template with a 400 before generating.
116
116
 
117
117
  ## Dependency ranges
118
118
 
119
- Every `@jxsuite/*` range a scaffold emits — including a starter clone's rebuilt `package.json` —
119
+ Every `@jxsuite/*` range a scaffold emits, including a starter clone's rebuilt `package.json`,
120
120
  comes from `template-versions.json`, never from a literal in code. A test asserts exactly that, so a
121
121
  future hardcoded range fails there.
122
122
 
@@ -130,16 +130,16 @@ that were never published, so `bun install` in a fresh scaffold could not resolv
130
130
 
131
131
  ## Surprises worth knowing
132
132
 
133
- - **Generation refuses a non-empty destination** — `Directory "<path>" is not empty`. An existing but
134
- empty directory is fine.
133
+ - **Generation refuses a non-empty destination.** It throws `Directory "<path>" is not empty`. An
134
+ existing but empty directory is fine.
135
135
  - **`$schema` points at a file this package does not write.** `project.schema.json` comes from
136
136
  `jx schema` (specs/extensions.md §5.2), so a fresh scaffold has a dangling reference until that
137
137
  runs.
138
- - **A starter's `package.json` is rebuilt, not copied** — anything its manifest declared beyond
138
+ - **A starter's `package.json` is rebuilt, not copied.** Anything its manifest declared beyond
139
139
  name/scripts/deps is lost by design.
140
140
  - **The design quickstart is best-effort on a starter**: an override only lands on a key the
141
141
  starter's style already declares, and `--color-primary-hover` is deliberately left alone. Two of
142
- them fall back rather than give up — `text` and `bodyFont` try `--color-text-primary` and
142
+ them fall back rather than give up: `text` and `bodyFont` try `--color-text-primary` and
143
143
  `--font-body` first, then the plain `color` / `fontFamily` keys. On a blank scaffold values are
144
144
  written directly. A non-empty `design.media` replaces `$media` wholesale;
145
145
  an empty one is treated as absent.
@@ -169,7 +169,7 @@ Per-file coverage thresholds live in `packages/create/bunfig.toml`.
169
169
  ## Docs
170
170
 
171
171
  User-facing documentation for this surface is `docs/framework/build/cli.md`, whose `code:`
172
- frontmatter already lists `index.ts`, `cli-args.ts`, `templates.ts` and `generate.ts` — a behavior
172
+ frontmatter already lists `index.ts`, `cli-args.ts`, `templates.ts` and `generate.ts`. A behavior
173
173
  change here trips `bun run docs:sync`.
174
174
 
175
175
  ## License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jxsuite/create",
3
- "version": "1.3.6",
3
+ "version": "1.3.8",
4
4
  "description": "Scaffold a new Jx project",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -37,6 +37,6 @@
37
37
  "test:coverage": "bun test --isolate --coverage"
38
38
  },
39
39
  "dependencies": {
40
- "@jxsuite/starters": "^1.6.3"
40
+ "@jxsuite/starters": "^1.6.5"
41
41
  }
42
42
  }
@@ -1,6 +1,6 @@
1
1
  {
2
- "parser": "^1.5.5",
3
- "compiler": "^2.0.7",
4
- "runtime": "^2.0.5",
5
- "server": "^2.2.7"
2
+ "parser": "^1.6.0",
3
+ "compiler": "^3.0.0",
4
+ "runtime": "^3.0.0",
5
+ "server": "^4.0.0"
6
6
  }