build: replace Makefile with package.json scripts - #373
Merged
Conversation
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
There was a problem hiding this comment.
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.jsonscripts (clean,build,lint,start,test,sync-fastly). - Removed the
Makefile. - Updated README and GitHub Actions workflow to use
npm run ...instead ofmake ....
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.
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
package.jsonscripts (clean/build/lint/start/test), which the Makefile targets and the npm scripts that delegated to them duplicated.sync-fastlyscript (the formermake sync-fastlytarget).stop/watch/devscripts: they referenced make targets that no longer existed, andnpm start(dev server +webpack-dev-middleware) already watches and rebuilds.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 lintruns the same eslint + sass-lint as before and passes (only pre-existing sass warnings, no errors).npm run buildruns the same clean + webpack; the CI build job exercises it.