Last active
January 17, 2023 15:06
-
-
Save mateusvelleda/607a9873d5fce526287b823791fe1a6f to your computer and use it in GitHub Desktop.
Makefile for node. Use ci-checks as a pre-push hook
This file contains 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
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