Skip to content

build: replace Makefile with package.json scripts - #373

Merged
cwillisf merged 2 commits into
developfrom
refactor/replace-makefile-with-npm-scripts
Jul 16, 2026
Merged

build: replace Makefile with package.json scripts#373
cwillisf merged 2 commits into
developfrom
refactor/replace-makefile-with-npm-scripts

Conversation

@cwillisf

@cwillisf cwillisf commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Proposed Changes

  • Replace the Makefile with package.json scripts (clean/build/lint/start/test), which the Makefile targets and the npm scripts that delegated to them duplicated.
  • Add a sync-fastly script (the former make sync-fastly target).
  • Drop the stop/watch/dev scripts: they referenced make targets that no longer existed, and npm start (dev server + webpack-dev-middleware) already watches and rebuilds.
  • Point CI (make lint -> npm run lint) and the README (make build -> npm run build) at the scripts.

Reason for Changes

The Makefile was a task runner doing what npm scripts already do, with an extra layer of indirection (npm -> make -> command) and some bit-rot (npm scripts calling make targets that no longer existed). Consolidating removes the redundant layer and is idiomatic for a JS/npm repo.

Test Coverage

  • npm run lint runs the same eslint + sass-lint as before and passes (only pre-existing sass warnings, no errors).
  • npm run build runs the same clean + webpack; the CI build job exercises it.
  • No behavior change to build or lint output; this is a task-runner swap.

The Makefile was a task runner duplicating what npm scripts already do,
with package.json scripts just delegating back to it (npm -> make ->
command). Convert the targets to scripts directly and drop the Makefile.

- build/clean/lint/start/test become package.json scripts
- add a sync-fastly script (was the make sync-fastly target)
- drop the stop/watch/dev scripts: they referenced make targets that no
  longer existed, and the dev server already watches via
  webpack-dev-middleware
- point CI and the README at npm run lint / npm run build

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the Makefile-based task runner layer and consolidates common project tasks (build/lint/start/test + Fastly sync) into package.json scripts, updating documentation and CI to call those scripts directly.

Changes:

  • Replaced Makefile targets with package.json scripts (clean, build, lint, start, test, sync-fastly).
  • Removed the Makefile.
  • Updated README and GitHub Actions workflow to use npm run ... instead of make ....

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
README.md Updates build instructions to use npm run build.
package.json Adds/rewires scripts to replace Makefile targets and removes stale make-delegating scripts.
Makefile Deletes the Makefile now that npm scripts cover the same tasks.
.github/workflows/deploy.yml Updates CI lint step to run npm run lint instead of make lint.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json Outdated
sass-lint ./src/**/*.scss already matches the whole tree, so the separate
./src/*.scss invocation was redundant (and matches nothing, since there
are no top-level src/*.scss files).
@cwillisf
cwillisf merged commit 59d07bb into develop Jul 16, 2026
4 checks passed
@cwillisf
cwillisf deleted the refactor/replace-makefile-with-npm-scripts branch July 16, 2026 19:21
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.

2 participants