Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 86 lines (71 sloc) 2.496 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86

NODE = node
TEST = support/expresso/bin/expresso
TESTS ?= test/*.test.js
PREFIX = /usr/local
LIB_PREFIX = $(HOME)/.node_libraries
DOCS = docs/index.md \
docs/methodOverride.md \
docs/conditionalGet.md \
docs/cookieDecoder.md \
docs/bodyDecoder.md \
docs/errorHandler.md \
docs/session.md \
docs/jsonrpc.md \
docs/staticProvider.md \
docs/compiler.md \
docs/router.md \
docs/lint.md \
docs/logger.md

MANPAGES = $(DOCS:.md=.1)
HTMLDOCS = $(DOCS:.md=.html)

test:
@NODE_ENV=test ./$(TEST) \
-I lib \
-I support/coffee-script/lib \
-I support/sass/lib \
-I support/less/lib \
$(TEST_FLAGS) $(TESTS)

test-cov:
@$(MAKE) test TEST_FLAGS="--cov"

install: install-docs
cp -fr lib/connect $(LIB_PREFIX)/connect

uninstall:
rm -f $(PREFIX)/share/man/man1/connect.1
rm -f $(PREFIX)/share/man/man1/connect-*.1
rm -fr $(LIB_PREFIX)/connect

install-docs:
cp -f docs/index.1 $(PREFIX)/share/man/man1/connect.1
cp -f docs/bodyDecoder.1 $(PREFIX)/share/man/man1/connect-bodyDecoder.1
cp -f docs/conditionalGet.1 $(PREFIX)/share/man/man1/connect-conditionalGet.1
cp -f docs/errorHandler.1 $(PREFIX)/share/man/man1/connect-errorHandler.1
cp -f docs/methodOverride.1 $(PREFIX)/share/man/man1/connect-methodOverride.1
cp -f docs/lint.1 $(PREFIX)/share/man/man1/connect-lint.1
cp -f docs/staticProvider.1 $(PREFIX)/share/man/man1/connect-staticProvider.1
cp -f docs/logger.1 $(PREFIX)/share/man/man1/connect-logger.1
cp -f docs/router.1 $(PREFIX)/share/man/man1/connect-router.1
cp -f docs/cookieDecoder.1 $(PREFIX)/share/man/man1/connect-cookieDecoder.1
cp -f docs/session.1 $(PREFIX)/share/man/man1/connect-session.1
cp -f docs/jsonrpc.1 $(PREFIX)/share/man/man1/connect-jsonrpc.1
cp -f docs/compiler.1 $(PREFIX)/share/man/man1/connect-compiler.1

benchmark: benchmarks/run
@./benchmarks/run

graphs: benchmarks/graph
@./benchmarks/graph

docs: docs/api.html $(MANPAGES) $(HTMLDOCS)

docs/api.html:
dox --title Connect \
--desc "High performance middleware for [node](http://nodejs.org)." \
$(shell find lib/connect/middleware/* -type f) > $@

%.1: %.md
@echo "... $< -> $@"
@ronn -r --pipe $< > $@ &

%.html: %.md
@echo "... $< -> $@"
@ronn -5 --pipe --fragment $< \
| cat docs/layout/api.head.html - docs/layout/api.foot.html \
| sed 's/NAME/Connect/g' \
| node support/highlight.js \
> $@ &

docclean:
rm -f docs/*.{1,html}

.PHONY: install uninstall docs test test-cov benchmark graphs install-docs docclean
Something went wrong with that request. Please try again.