Makefile: added 'doc' target
[remotestorage.js] / Makefile
1 NODEJS         = node
2 DOC_BIN        = naturaldocs
3 DOC_DIR        = ./doc/code
4 DOC_CONFIG_DIR = ./doc/config
5 DOC_CUSTOM_CSS = custom-1
6 SOURCE_DIR     = ./src
7 ASSETS_DIR     = ./assets
8 ASSETS_OUT     = $(SOURCE_DIR)/assets.js
9 DOC_INPUTS     = -i $(SOURCE_DIR)
10
11 default: help
12
13 help:
14         @echo "help           - display this text"
15         @echo "buildserver    - start build server (running on port 8000)"
16         @echo "build-all      - download complete build from build server"
17         @echo "compile-assets - compile $(ASSETS_DIR)/* into $(ASSETS_OUT)"
18
19 buildserver:
20         cd build/ && node server.js
21
22 build-all:
23         curl -X POST -d 'groups=core&groups=widget&groups=baseclient&groups=caching&groups=modules&groups=debug' http://localhost:8000/ -o remotestorage.js
24
25 minify:
26         uglifyjs remotestorage.js -o remotestorage.min.js --mangle --wrap --export-all
27
28 build:
29         $(NODEJS) build/do-build.js core widget baseclient caching modules debug
30
31 compile-assets: $(ASSETS_DIR)/*
32         $(NODEJS) build/compile-assets.js $(ASSETS_DIR) $(ASSETS_OUT)
33
34 doc:
35         mkdir -p $(DOC_DIR) $(DOC_CONFIG_DIR)
36         $(DOC_BIN) $(DOC_INPUTS) -o html $(DOC_DIR) -p $(DOC_CONFIG_DIR) -s Default $(DOC_CUSTOM_CSS)
37
38 .PHONY: help buildserver build-all compile-assets minify build doc