Skip to content

Instantly share code, notes, and snippets.

@mateusvelleda
Last active January 17, 2023 15:06
Show Gist options
  • Save mateusvelleda/607a9873d5fce526287b823791fe1a6f to your computer and use it in GitHub Desktop.
Save mateusvelleda/607a9873d5fce526287b823791fe1a6f to your computer and use it in GitHub Desktop.
Makefile for node. Use ci-checks as a pre-push hook
RUNNER:=yarn
ifneq ("$(wildcard ./package-lock.json)","")
RUNNER:=npm
endif
INSTALL_CMD:=$(RUNNER) install
RUN_CMD:=$(RUNNER) run
RUN = $(INSTALL_CMD) && $(RUN_CMD)
storybook:
$(RUN) storybook
test:
$(RUN) test:coverage
lint:
$(RUN) lint
typecheck:
$(RUN) check:types
ci-checks: lint typecheck test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment