Skip to content

[chore]: standardize makefile to npm run calls#227

Open
banana-three-join wants to merge 4 commits into
layer5io:masterfrom
banana-three-join:chore/banana-three-join/makefile-standardize
Open

[chore]: standardize makefile to npm run calls#227
banana-three-join wants to merge 4 commits into
layer5io:masterfrom
banana-three-join:chore/banana-three-join/makefile-standardize

Conversation

@banana-three-join

@banana-three-join banana-three-join commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Notes for Reviewers

This PR fixes #226

Summary

Makefile

Bug fixes

  • clean ran hugo --cleanDestinationDir — a build, not a clean. public/ and resources/ were never removed. Now npm run clean.
  • build ran bare hugo (a production build, no clean) under a "local machine" label. Now npm run build (dev build with clean + drafts/future content).

Behavior

  • site: hugo server -D -Fnpm run site (adds --cleanDestinationDir, -E for expired content, and --minify).
  • lint-fix: no longer installs markdownlint-cli2 globally (npm install -g); uses npx --yes. Scope narrowed from **/*.md to content/**/*.md.

Added

  • Missing include .github/build/Makefile.core.mk (the old file only included Makefile.show-help.mk).
  • Targets: build-preview, build-production, site-no-watch, check-links, format, format-check, check-deps, theme-update.
  • HTMLTEST_VERSION ?= latest (+ export) — single place to pin htmltest.
  • check-go check-deps prerequisites on all build/serve/theme targets (previously only site had check-go).

Structural

  • All recipes now route through npm run instead of calling hugo directly, making package.json the single source of Hugo flags.

package.json

Removed

  • Trailing -- on _build and build — no-ops
  • check:links:all, precheck:links:all — orphaned; nothing invoked them

Renamed

  • _serve_site, servesite
  • update:depupdate:pkg:dep, update:hugoupdate:pkg:hugo

Added

  • Scripts: site, site:no-watch, format, format:check, update:theme
  • prettier@3.8.3

Behavior

  • build:production: added --gc (cache garbage collection; output unchanged)
  • Serve uses canonical hugo server instead of the serve alias, and --renderToMemory was dropped, so serve now writes to public/
  • _check:links: IMPLEMENTATION PENDINGSkipped: go run …htmltest… -s. Link checking remains a no-op, now explicitly labelled.

Dependencies

  • autoprefixer floor ^10.4.21^10.5.0
  • postcss floor ^8.5.14^8.5.15
  • Added prettier@3.8.3
  • package-lock.json regenerated to match

Breaking

  • npm run serve, _serve, update:dep, update:hugo, check:links:all no longer exist.
  • make build now cleans the destination directory and includes drafts/future content; use make build-production for production output.

Signed commits

  • Yes, I signed my commits.

…e makefile recipes to utilize npm scripts

Signed-off-by: Lenox Wiltshire <lenoxwiltshire@gmail.com>
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

🚀 Preview deployment: https://layer5io.github.io/academy-theme/pr-preview/pr-227/

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces an .htmltest.yml configuration for link checking, refactors the Makefile to delegate tasks to npm scripts, and updates package.json with new scripts for building, formatting with Prettier, and updating the theme. Feedback on these changes highlights that the _check:links script only echoes the command instead of executing it, disabling link checking. Additionally, it is recommended to define a lint:fix script in package.json, add markdownlint-cli2 to devDependencies for reproducible linting, and update the Makefile to invoke this script via npm rather than using npx directly.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread package.json
Comment thread Makefile
Comment thread package.json Outdated
Comment thread package.json Outdated
Comment thread package.json Outdated
Comment thread package.json Outdated
Comment thread package.json Outdated
…update package.json metadata

Signed-off-by: Lenox Wiltshire <lenoxwiltshire@gmail.com>
Signed-off-by: Lenox Wiltshire <lenoxwiltshire@gmail.com>
Signed-off-by: Lenox Wiltshire <lenoxwiltshire@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Standardize Makefiles across all meshery-academy repositories

3 participants