GREP ?= "" GITHUB_REF ?= "master" # Automatically install `github.com/matthewmueller/make` if we haven't already includes := $(wildcard ${.INCLUDE_DIRS}/github.com/matthewmueller/make/all.mk) ifeq ($(strip ${includes}),) installer := $(shell >&2 echo "Installing 'github.com/matthewmueller/make'..." && \ curl -sL https://raw.githubusercontent.com/matthewmueller/make/master/install.sh | sh) endif include github.com/matthewmueller/make/all.mk # Precommit hook precommit: install test clean: @ rm -rf node_modules install: clean bin.npm @ npm install check: @ ./node_modules/.bin/tsc check.watch: @ ./node_modules/.bin/tsc -w test: clean install check @ ./node_modules/.bin/mocha test/index.js -b -g "$(GREP)" --timeout 20s test.only: @ ./node_modules/.bin/mocha test/index.js -b -g "$(GREP)" --timeout 20s publish: bin.npm bin.node env.NPM_TOKEN test @ echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc @ if [ "$(shell npm show taz version)" != "$(shell node -p -e "require('./package.json').version")" ]; then \ npm publish; \ fi # Run through CI ci.test: test ci.deploy: publish