forked from 1602/compound
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
77 lines (55 loc) · 1.86 KB
/
Makefile
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
# TESTS
TESTER = ./node_modules/.bin/mocha
OPTS = --require ./test/init.js
TESTS = test/*.test.js
test:
$(TESTER) $(OPTS) $(TESTS)
test-verbose:
$(TESTER) $(OPTS) --reporter spec $(TESTS)
testing:
$(TESTER) $(OPTS) --watch $(TESTS)
# MAN DOCS
CLI_MAN = $(shell find docs/cli -name '*.md' \
|sed 's|.md|.1|g' \
|sed 's|docs/cli/|man/|g' )
API_MAN = $(shell find docs/api -name '*.md' \
|sed 's|.md|.3|g' \
|sed 's|docs/api/|man/|g' )
CLI_WEB = $(shell find docs/cli -name '*.md' \
|sed 's|.md|.1.html|g' \
|sed 's|docs/cli/|man/html/|g' )
API_WEB = $(shell find docs/api -name '*.md' \
|sed 's|.md|.3.html|g' \
|sed 's|docs/api/|man/html/|g' ) \
man/html/railway-changelog.3.html \
man/html/changelog.3.html \
man/%.1: docs/cli/%.md scripts/doc.sh
@[ -d man ] || mkdir man
scripts/doc.sh $< $@
man/%.3: docs/api/%.md scripts/doc.sh
@[ -d man ] || mkdir man
scripts/doc.sh $< $@
man/html/%.3.html: docs/api/%.md scripts/doc.sh docs/footer.html
@[ -d man/html ] || mkdir -p man/html
scripts/doc.sh $< $@
man/html/%.1.html: docs/cli/%.md scripts/doc.sh
@[ -d man/html ] || mkdir -p man/html
scripts/doc.sh $< $@
man/html/railway-changelog.3.html: RAILWAY-CHANGELOG.md scripts/doc.sh
scripts/doc.sh $< $@
man/html/changelog.3.html: CHANGELOG.md scripts/doc.sh
scripts/doc.sh $< $@
MAN = $(API_MAN) $(CLI_MAN)
build: man
html: $(API_WEB) $(CLI_WEB)
web: $(API_WEB)
rsync ./man/html/* compoundjs.com:/var/www/apps/compoundjs.com/public/man
scp ./docs/index.html compoundjs.com:/var/www/apps/compoundjs.com/compound/docs
all: $(MAN) $(API_WEB)
man: $(MAN)
# WEBSITE DOCS
docs:
node docs/sources/build
apidocs:
makedoc lib/*.js lib/*/*.js -t "RailwayJS API docs" -g "1602/express-on-railway" --assets
.PHONY: test doc docs