-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
44 lines (36 loc) · 796 Bytes
/
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
PATH_NODE_MODULES := node_modules
PATH_DOCS := doc
PATH_DOCS_API := $(PATH_DOCS)/api
# Macros
EXISTS_DOCS = $(shell $(TEST) -d $(PATH_DOCS_API) && printf '1')
# Commands
RM := rm
TEST := test
.PHONY: \
all \
help \
install \
uninstall \
test \
.installDependencyNodeSource \
$(TEST_FILES)
all: help
help:
########################################
# Help:
# help Show the help.
# html Generate the html docs.
# clean Cleanup the project.
########################################
clean: .cleanHtml
html: .cleanHtml
# Create html docs under $(PATH_DOCS)/api
@$(PATH_NODE_MODULES)/.bin/jsdoc \
--destination $(PATH_DOCS_API) \
--recurse \
lib/
.cleanHtml:
ifeq ($(EXISTS_DOCS),1)
# Remove html docs
@$(TEST) ! -d $(PATH_DOCS_API) || $(RM) -r $(PATH_DOCS_API)
endif