Skip to content

Instantly share code, notes, and snippets.

@davidchambers
Created March 8, 2014 00:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidchambers/9423195 to your computer and use it in GitHub Desktop.
Save davidchambers/9423195 to your computer and use it in GitHub Desktop.
Exclude files with "doctest ignore" in first line when running doctests
DOCTEST = node_modules/.bin/doctest --module commonjs
.PHONY: test
test: JS_FILES = $(shell find . -name '*.js' -not -path './node_modules/*' -not -path './test/*')
test:
@$(foreach file,$(JS_FILES),head -n 1 -- $(file) | grep --silent 'doctest ignore' - || $(DOCTEST) $(file) || exit 1;)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment