@milesroxas/create-design-hub 0.1.3 → 0.2.0

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/index.mjs CHANGED
@@ -73,7 +73,8 @@ const errors = validate(values);
73
73
  if (Object.keys(errors).length) fail(Object.values(errors).join(' '), { errors });
74
74
  const { path, visibility = 'none', link } = values;
75
75
  const name = basename(path);
76
- const next = `pnpm --dir "${path}" bootstrap`;
76
+ // dev claims the folder's port on its first start; bootstrap is only for its flags (TypeSafe, Vercel, Conductor).
77
+ const next = `pnpm --dir "${path}" ${values['no-install'] ? 'install' : 'dev'}`;
77
78
 
78
79
  // A second run finds the project already there and changes nothing.
79
80
  if (existsSync(join(path, 'package.json')) && existsSync(join(path, '.git'))) {
package/lib.mjs CHANGED
@@ -39,7 +39,7 @@ export const RENAMES = { _gitignore: '.gitignore', _gitattributes: '.gitattribut
39
39
  export const SKIP = new Set(['node_modules', 'dist', '.env', 'pnpm-lock.yaml']);
40
40
  export const SKIP_DIRS = {
41
41
  '.design-hub': new Set(['checks.json']),
42
- '.claude': new Set(['settings.json', 'launch.json']),
42
+ '.claude': new Set(['settings.json']),
43
43
  };
44
44
 
45
45
  /** The problems with a create request, by flag; empty when it is valid. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@milesroxas/create-design-hub",
3
- "version": "0.1.3",
3
+ "version": "0.2.0",
4
4
  "description": "Create a Design Hub project: the thin folder of prototypes, kit materials and docs that installs the @milesroxas/design-hub package. Runs as `npm create @milesroxas/design-hub`.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -31,7 +31,7 @@
31
31
  ],
32
32
  "devDependencies": {
33
33
  "@biomejs/biome": "2.6.3",
34
- "@milesroxas/design-hub": "0.1.3"
34
+ "@milesroxas/design-hub": "0.2.0"
35
35
  },
36
36
  "scripts": {
37
37
  "check": "biome check --config-path ../design-hub/configs/biome .",
package/setup/app.html CHANGED
@@ -623,7 +623,7 @@
623
623
  }),
624
624
  card({
625
625
  icon: 'folder', title: 'Come back later',
626
- desc: 'Design Hub.command in the project folder reopens this page.',
626
+ desc: 'Design Hub.command in the project folder starts the hub and opens it in your browser.',
627
627
  run: async () => {
628
628
  const res = await api('/api/reveal', { path: project.path });
629
629
  return res.ok ? 'Shown in Finder.' : null;
package/setup/server.mjs CHANGED
@@ -42,9 +42,12 @@ const HOME = homedir();
42
42
  const MAC = platform() === 'darwin';
43
43
  const TOKEN = randomBytes(16).toString('hex');
44
44
  const CREATE = join(HERE, '..', 'index.mjs');
45
- // Inside the Design Hub repo itself, new projects link the local package instead of the published one.
45
+ // Inside a developer's checkout of the Design Hub repo, new projects link the
46
+ // local package instead of the published one. A downloaded ZIP of the repo has
47
+ // the same folders but no build, so it must install from npm like anyone else:
48
+ // the link needs the built CLI, not just the package.json.
46
49
  const LOCAL_HUB = join(HERE, '..', '..', 'design-hub');
47
- const LINK = existsSync(join(LOCAL_HUB, 'package.json')) ? LOCAL_HUB : undefined;
50
+ const LINK = existsSync(join(LOCAL_HUB, 'dist', 'scripts', 'cli.js')) ? LOCAL_HUB : undefined;
48
51
  // The pnpm major projects are installed with.
49
52
  const PNPM = 'pnpm@12';
50
53
 
@@ -49,7 +49,7 @@ pnpm fixtures-pull <slug> --collection <id> --map key=field # real fixtures fr
49
49
  pnpm commands # every command, with its flags, as JSON
50
50
  ```
51
51
 
52
- The port is Conductor's `$CONDUCTOR_PORT` in a workspace, else the `PORT` in `.env` that `pnpm bootstrap` picked. A taken port is refused. Never pass another port: a second port silently serves the wrong project.
52
+ Each checkout (the main clone, a git worktree, a harness workspace) runs on its own port. A new one needs only `pnpm install && pnpm dev`: the first start claims a free port for the folder and writes it to `.env`. A harness that assigns ports sets `$DESIGN_HUB_PORT` (Conductor's `$CONDUCTOR_PORT` also works), and that wins. A taken port is refused. Never pass another port: a second port silently serves the wrong project.
53
53
 
54
54
  ## Layout
55
55
 
@@ -128,6 +128,6 @@ The `miles-*` skills in `.claude/skills/` come from the `@milesroxas/design-hub`
128
128
  | `miles-deploy` | Deploying, sharing a link, the password, checking the work before either. |
129
129
  | `miles-review` | Comments from the deployed prototypes, and who may comment. |
130
130
  | `miles-port` | Turning an approved prototype into production. |
131
- | `miles-conductor` | Conductor workspaces and port collisions. |
131
+ | `miles-worktrees` | Worktrees, parallel agents, Conductor or any harness, and port collisions. |
132
132
 
133
133
  Existing skills these lean on: `emil-prototype`, `emil-animations`, `emil-touch-and-accessibility`, `emil-performance`, `emil-writing-skills` for every Markdown file, `impeccable` for a design pass. If a skill disagrees with this file, this file wins.
@@ -3,12 +3,14 @@
3
3
  Prototypes for one product or website, built on [Design Hub](https://github.com/milesroxas/design-hub). One repo holds the prototypes, the design rules, the walkthroughs reviewers read, and their comments.
4
4
 
5
5
  ```bash
6
- pnpm bootstrap # once per clone: a free port into .env, install
7
- pnpm dev # http://localhost:<PORT>
6
+ pnpm install
7
+ pnpm dev # http://localhost:<PORT>; the first start claims a free port for this folder
8
8
  ```
9
9
 
10
10
  Or double-click `Design Hub.command`.
11
11
 
12
+ Not a developer? The [guide](https://github.com/milesroxas/design-hub/tree/main/docs/guide) covers setup, working with Claude, sharing a link and comments.
13
+
12
14
  | Path | What goes there |
13
15
  | --- | --- |
14
16
  | `prototypes/<slug>/` | One prototype: its README, code, styles and fixtures. `sample-list/` is the reference; delete it once the project has a feature. |
@@ -31,8 +31,9 @@ docs/.obsidian/workspace*.json
31
31
  .impeccable/live/
32
32
  .impeccable/hook.cache.json
33
33
 
34
- # Claude Code worktrees
34
+ # Claude Code worktrees, and the preview config: it holds this folder's port, like .env
35
35
  .claude/worktrees/
36
+ .claude/launch.json
36
37
 
37
38
  # Conductor per-developer settings
38
39
  .conductor/settings.local.toml