Blame view

node_modules/superagent/Makefile 1.22 KB
f7563de62   Palak Handa   first commit
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
  
  NODETESTS ?= test/*.js test/node/*.js
  BROWSERTESTS ?= test/*.js test/client/*.js
  REPORTER = spec
  
  all: superagent.js
  
  test:
  	@if [ "x$(BROWSER)" = "x" ]; then make test-node; else make test-browser; fi
  
  test-node:
  	@NODE_ENV=test NODE_TLS_REJECT_UNAUTHORIZED=0 ./node_modules/.bin/mocha \
  		--require should \
  		--reporter $(REPORTER) \
  		--timeout 5000 \
  		--growl \
  		$(NODETESTS)
  
  test-cov: lib-cov
  	SUPERAGENT_COV=1 $(MAKE) test REPORTER=html-cov > coverage.html
  
  test-browser:
  	./node_modules/.bin/zuul -- $(BROWSERTESTS)
  
  test-browser-local:
  	./node_modules/.bin/zuul --local 4000 -- $(BROWSERTESTS)
  
  lib-cov:
  	jscoverage lib lib-cov
  
  superagent.js: lib/node/*.js lib/node/parsers/*.js
  	@./node_modules/.bin/browserify \
  		--standalone superagent \
  		--outfile superagent.js .
  
  test-server:
  	@node test/server
  
  docs: index.html test-docs docs/index.md
  
  index.html: docs/index.md docs/head.html docs/tail.html
  	marked < $< \
  		| cat docs/head.html - docs/tail.html \
  		> $@
  
  docclean:
  	rm -f index.html test.html
  
  test-docs: docs/head.html docs/tail.html
  	make test REPORTER=doc \
  		| cat docs/head.html - docs/tail.html \
  		> test.html
  
  clean:
  	rm -fr superagent.js components
  
  .PHONY: test-cov test docs test-docs clean test-browser-local