Skip to content

chore: friendlier Makefile (help, pre-flight, clean, doctor, banners)#45

Merged
viniciusdc merged 1 commit into
chore/pixi-env-for-local-devfrom
chore/makefile-ux
May 15, 2026
Merged

chore: friendlier Makefile (help, pre-flight, clean, doctor, banners)#45
viniciusdc merged 1 commit into
chore/pixi-env-for-local-devfrom
chore/makefile-ux

Conversation

@viniciusdc

Copy link
Copy Markdown
Owner

Closes #44. Stacks on #43 — base is chore/pixi-env-for-local-dev, will retarget to main once #43 lands.

Summary

A small polish pass on the Makefile so a fresh checkout is more welcoming than "you got a command-not-found error."

  • Default to help. make with no args now runs make help, which auto-generates a target list from ## description comments. No more silent no-op.
  • Pixi pre-flight check. A _check_pixi phony prereq fails fast with a friendly install pointer when pixi isn't on PATH, instead of letting every pixi-using target die with pixi: command not found.
  • make clean. Removes dist/, .astro/, .pixi/, node_modules/ — for when state is corrupted or you want a real fresh start.
  • make doctor. Prints resolved versions of pixi, Node, and npm — useful when something is wedged and you need to know which Node is actually running.
  • ==> banners. Each target echoes a single colored banner line before doing its work so the output isn't an undifferentiated wall of npm log.
  • make post error message now shows the accepted TYPE values (note|arch) instead of only naming the flag.

Things deliberately skipped from #44

  • make open to launch the dev server in a browser — risks opening a dead URL if dev isn't running yet, and the URL is already printed by make dev. Not worth the platform-detection logic.
  • tput-based colors. Using inline ANSI escape codes instead — same effect, no extra dependency, works on every modern terminal we care about.

Test plan

  • make (no args) renders the help block locally.
  • make doctor prints versions (pixi 0.59.0, node v22.x, npm 11.x).
  • make post without TITLE shows the friendlier error.
  • make check still routes through pixi.
  • Reviewer confirms make works on a clean clone without pixi installed and shows the friendly pointer.

Closes #44.

- `make` with no args now defaults to `help`, which is auto-generated
  from `## description` comments next to each target.
- `_check_pixi` phony prereq fails fast with an install pointer when
  pixi isn't on PATH, instead of letting every target die with
  "pixi: command not found".
- New `clean` target: removes dist/, .astro/, .pixi/, node_modules/.
- New `doctor` target: prints resolved pixi/node/npm versions.
- Every target now echoes a short `==>` banner so the output isn't a
  wall of npm log.
- `make post` error message now shows the accepted TYPE values
  (`note|arch`) instead of only naming the flag.
@viniciusdc viniciusdc merged commit 3e3b83c into chore/pixi-env-for-local-dev May 15, 2026
1 check passed
@viniciusdc viniciusdc deleted the chore/makefile-ux branch May 15, 2026 18:21
viniciusdc added a commit that referenced this pull request May 15, 2026
* chore: add pixi env for local dev (Node 22 from conda-forge)

System Node doesn't matter anymore — pixi solves a Node 22.12+ env
from conda-forge on first `make <target>` and routes all npm work
through it. Fixes "Node.js v20 is not supported by Astro" when the
system has an older Node.

- pixi.toml: workspace + tasks (install, dev, build, preview, check,
  banner) with depends-on so `pixi run dev` implies install.
- Makefile: every target shells to `pixi run <task>`.
- .gitignore: add .pixi/.
- README: short pixi setup note + install link.

CI is unchanged — it still uses actions/setup-node directly. This
only affects local development.

* chore: friendlier Makefile (help, pre-flight, clean, doctor, banners) (#45)

Closes #44.

- `make` with no args now defaults to `help`, which is auto-generated
  from `## description` comments next to each target.
- `_check_pixi` phony prereq fails fast with an install pointer when
  pixi isn't on PATH, instead of letting every target die with
  "pixi: command not found".
- New `clean` target: removes dist/, .astro/, .pixi/, node_modules/.
- New `doctor` target: prints resolved pixi/node/npm versions.
- Every target now echoes a short `==>` banner so the output isn't a
  wall of npm log.
- `make post` error message now shows the accepted TYPE values
  (`note|arch`) instead of only naming the flag.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant