create-quadrokit 0.3.1 → 0.3.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.
Files changed (2) hide show
  1. package/README.md +8 -1
  2. package/package.json +6 -5
package/README.md CHANGED
@@ -34,7 +34,14 @@ Interactive mode: run without `--template` / `--dir` / `--name` to be prompted.
34
34
  1. Copies the chosen template from `create-quadrokit/templates/<name>` when installed from npm, or `packages/templates/<name>` when you run the CLI from the monorepo (skips `node_modules`, `dist`, `.quadrokit`, lockfiles).
35
35
  2. Overlays **`template-common/`** (shared across all templates): `.env.example`, `vite.config.ts`, `tailwind.config.ts`, `tsconfig*.json`, `postcss.config.js`, `biome.json`, `src/vite-env.d.ts`, `.cursor/rules/commitlint-conventional.mdc`, etc. In the monorepo, `packages/templates/*` receives the same overlay via `bun run sync:template-common` (root **postinstall** and `bun run build`); those paths are gitignored under `packages/templates/` so only `template-common/` is the source of truth in git.
36
36
  3. Rewrites `src/lib/quadro-client.ts` to import from `@quadrokit/generated/client.gen.js` (alias in `vite.config.ts` / `tsconfig.app.json`).
37
- 4. Removes `@quadrokit/sample-client` and rewrites any `workspace:…` protocol on `@quadrokit/*` deps to published semver ranges (`package.json` **`quadrokitScaffoldVersions`**, per package, with fallback `^<create-quadrokit version>`). Update **`quadrokitScaffoldVersions`** when releasing `@quadrokit/client` / `@quadrokit/ui` so `bun install` resolves npm tarballs outside the monorepo. Use **`--keep-workspace`** only for development inside the QuadroKit repo.
37
+ 4. Removes `@quadrokit/sample-client` and rewrites any `workspace:…` protocol on `@quadrokit/*` deps to published semver ranges. **`quadrokitScaffoldVersions`** in this package’s `package.json` pins `^` ranges for `@quadrokit/client` and `@quadrokit/ui` (fallback: `^<create-quadrokit version>`). Use **`--keep-workspace`** only for development inside the QuadroKit repo.
38
+
39
+ ### Publishing `create-quadrokit` to npm
40
+
41
+ Before publishing a new **create-quadrokit** version, bump **`@quadrokit/client`** and **`@quadrokit/ui`** in the monorepo as needed, then **`quadrokitScaffoldVersions` must match** those releases so `bunx create-quadrokit` scaffolds apps that install the right packages from the registry.
42
+
43
+ - **Automated:** `prepublishOnly` runs **`scripts/sync-scaffold-versions.ts`**, which sets `quadrokitScaffoldVersions` from `packages/client/package.json` and `packages/ui/package.json` `version` fields (as `^x.y.z`). Run `bun run scripts/sync-scaffold-versions.ts` from `create-quadrokit/` anytime to refresh the field before committing.
44
+ - **Manual:** If you ever edit `quadrokitScaffoldVersions` by hand, align `^` ranges with the published `@quadrokit/client` / `@quadrokit/ui` versions users will install.
38
45
  5. Writes `QUADROKIT.md` with proxy and `quadrokit:generate` instructions. Does **not** copy `.quadrokit/generated` — run `bun run quadrokit:generate` after install.
39
46
  6. Adds a root `.gitignore` (unless the template already shipped one).
40
47
  7. Optionally copies `.env.example` to `.env` (prompt, or defaults with `-y`; use `--no-copy-env` to skip).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-quadrokit",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Scaffold a QuadroKit Vite + React app from a template",
5
5
  "type": "module",
6
6
  "bin": "./dist/index.mjs",
@@ -13,8 +13,9 @@
13
13
  "scripts": {
14
14
  "build": "tsc -p tsconfig.build.json && bun ../scripts/rename-dist-js-to-mjs.ts dist",
15
15
  "typecheck": "tsc -p tsconfig.json --noEmit",
16
- "prepublishOnly": "bun run scripts/sync-template-common-into-packages.ts && bun run scripts/sync-for-publish.ts && bun run build",
17
- "sync:template-common": "bun run scripts/sync-template-common-into-packages.ts"
16
+ "prepublishOnly": "bun run scripts/sync-scaffold-versions.ts && bun run scripts/sync-template-common-into-packages.ts && bun run scripts/sync-for-publish.ts && bun run build",
17
+ "sync:template-common": "bun run scripts/sync-template-common-into-packages.ts",
18
+ "sync:scaffold-versions": "bun run scripts/sync-scaffold-versions.ts"
18
19
  },
19
20
  "dependencies": {
20
21
  "prompts": "^2.4.2"
@@ -25,7 +26,7 @@
25
26
  "typescript": "^5.9.3"
26
27
  },
27
28
  "quadrokitScaffoldVersions": {
28
- "@quadrokit/client": "^0.3.0",
29
- "@quadrokit/ui": "^0.3.0"
29
+ "@quadrokit/client": "^0.3.2",
30
+ "@quadrokit/ui": "^0.3.2"
30
31
  }
31
32
  }