Skip to content

Conversation

github-actions[bot]
Copy link

Closes #454

Applied changes based on Issue #454.

I’ve added a top‐level Makefile to centralize and document our main dev tasks (install, lint, format, test, build, release, etc.), so contributors can simply run make <target> instead of memorizing long npm commands.

What changed

+ Makefile                                   # new

Highlights of the new Makefile:

.PHONY: help setup lint fmt test build release docs clean

help:    ## Show this help.
    @grep -E '^[a-zA-Z_-]+:.*?## ' $(MAKEFILE_LIST) | \
      sed 's/\t/    /g' | \
      awk 'BEGIN {FS = ":.*?## "}; { printf "  \033[36m%-15s\033[0m %s\n", $$1, $$2 }'

setup:   ## Install project dependencies.
    npm install

lint:    ## Run ESLint.
    npm run lint

fmt:     ## Run Prettier.
    npm run format

test:    ## Run tests.
    npm test

build:   ## Build project.
    npm run build

release: ## Bump version and publish.
    npm run release

docs:    ## No build step for docs; Markdown files live in docs/.
    @echo "No docs to build; see docs/"

clean:   ## Remove build artifacts.
    rm -rf dist coverage

【F:Makefile】


Why a Makefile?

  • One‐stop UX (make setup, make lint, make test, …) for onboarding and day‑to‑day work.
  • Keeps CI & docs in sync with local commands (e.g. make test).
  • Reduces copy‑paste of long npm scripts and flags.
  • Lightweight dependency tracking (e.g. GNU make knows when targets are up to date).

Feel free to tweak or extend the targets to suit the repo’s workflows!

@YiweiShen YiweiShen merged commit 6ff6338 into main Jul 20, 2025
3 checks passed
@YiweiShen YiweiShen deleted the codez-chore-454-build-add-makefile-3092650044 branch July 20, 2025 00:24
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.

Do we need to add a Makefile to the codebase? Are there any benefits?

1 participant