1 # get Makefile directory name: http://stackoverflow.com/a/5982798/376773
2 THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
3 THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
6 BIN := $(THIS_DIR)/node_modules/.bin
9 PATH := node_modules/.bin:$(PATH)
13 NODE ?= $(shell which node)
14 YARN ?= $(shell which yarn)
15 PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm))
16 BROWSERIFY ?= $(NODE) $(BIN)/browserify
22 node_modules: package.json
23 @NODE_ENV= $(PKG) install
27 eslint browser.js debug.js index.js node.js
30 istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
39 karma start --single-run
48 cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
50 .PHONY: all install clean distclean