Skip to content

Instantly share code, notes, and snippets.

@saidinesh5
Created May 18, 2012 21:35
Show Gist options
  • Save saidinesh5/2727732 to your computer and use it in GitHub Desktop.
Save saidinesh5/2727732 to your computer and use it in GitHub Desktop.
A nice Makefile for my Node.js projects.
#
# My Fancy Node.js project
#
PROJECT = "My Fancy Node.js project"
all: install test server
debug: ;@echo "Debugging ${PROJECT}.....http://0.0.0.0:8080/debug?port=5858 to start debugging"; \
export NODE_PATH=.; \
node-inspector & coffee --nodejs --debug app.coffee;
test: ;@echo "Testing ${PROJECT}....."; \
export NODE_PATH=.; \
./node_modules/mocha/bin/mocha;
server : ;@echo "Starting ${PROJECT}....."; \
export NODE_PATH=.; \
coffee app.coffee
install: ;@echo "Installing ${PROJECT}....."; \
npm install
update: ;@echo "Updating ${PROJECT}....."; \
git pull --rebase; \
npm install
clean : ;
rm -rf node_modules
.PHONY: test server install clean update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment