Created
April 12, 2019 11:33
-
-
Save ziazon/4f77643f26863e9a0192ef8b2c642b38 to your computer and use it in GitHub Desktop.
Makefile for npm ui projects
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
.PHONY: help install lint test-unit test-e2e test-e2e-headless | |
.DEFAULT_GOAL := help | |
help: | |
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | |
install: ## Creates the config.json and install npm dependencies for the project | |
@echo 'installing Node dependencies' | |
@npm ci | |
lint: install ## runs linter | |
@echo 'running linter' | |
@npm run lint | |
test-unit: install ## runs unit tests | |
@echo 'running unit tests' | |
@npm run test:unit | |
test-e2e: install ## runs end to end tests in interactive mode | |
@echo 'running end to end tests' | |
@npm run test:e2e | |
test-e2e-headless: install ## runs end to end tests in headless mode | |
@echo 'running end to end tests in headless mode' | |
@npm run test:e2e-headless |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment