Skip to content

Instantly share code, notes, and snippets.

@rschooley
Created December 27, 2013 17:58
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 rschooley/8150450 to your computer and use it in GitHub Desktop.
Save rschooley/8150450 to your computer and use it in GitHub Desktop.
Mafile for node dev, prod, and test (with mocha)
TEST = $(shell find test -name "*-tests.js")
dev:
node web.js
test:
NODE_ENV=test node_modules/mocha/bin/mocha $(TEST) --reporter dot
production:
NODE_ENV=production node web.js
.PHONY: dev test production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment