@ndhoule/includes
Version:
Determine whether or not a value is contained by a given collection.
61 lines (48 loc) • 977 B
Plain Text
#
# Files.
#
SRCS = index.js
TESTS = test/index.js
#
# Options.
#
GREP ?=.
#
# Tasks.
#
# Install node packages.
node_modules: $(wildcard package.json node_modules/*/package.json)
@npm install
# Remove temporary files.
clean:
@rm -rf *.log
# Remove temporary and packaged files.
distclean: clean
@rm -rf node_modules
# Format files.
fmt: node_modules
@node_modules/.bin/jsfmt --write $(SRCS) $(TESTS)
# Lint files.
lint: node_modules
@node_modules/.bin/eslint $(SRCS) $(TESTS)
# Run tests in node.
test: node_modules
@node_modules/.bin/mocha \
--ui bdd \
--reporter spec \
--grep "$(GREP)" \
$(TESTS)
.DEFAULT_GOAL = test
# Run tests in a Sauce Labs browser.
test-browser: node_modules
@node_modules/.bin/zuul -- $(TESTS)
# Run tests in a local browser.
test-browser-local: node_modules
@node_modules/.bin/zuul --local -- $(TESTS)