-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
69 lines (44 loc) · 1.46 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
# Reference card for usual actions in development environment.
#
NPM = npm
BIN_DIR = node_modules/.bin
BOWER = $(BIN_DIR)/bower
GRUNT = $(BIN_DIR)/grunt
GHP = ghp-import
.PHONY: help develop bower watch public clean dist-clean maintainer-clean gh-pages-commit gh-pages-push
#: help - Display available targets.
help:
@echo "Reference card for usual actions in development environment."
@echo "Here are available targets:"
@egrep -o "^#: (.+)" [Mm]akefile | sed 's/#: /* /'
#: develop - Install development libraries.
develop:
$(NPM) install
pip install ghp-import
#: bower - Download libraries with bower.
bower:
$(BOWER) install
#: watch - Watch in-development files and automatically build them on update.
watch:
$(GRUNT) watch
#: public - Generate public/ folder contents.
public: bower
$(GRUNT) copy less uglify
#: serve - Serve public/ folder on localhost:8000
serve:
cd public/ && python -m SimpleHTTPServer
#: clean - Basic cleanup, mostly temporary files.
clean:
#: distclean - Remove local builds
dist-clean: clean
rm -rf public/
rm -rf bower_components/
#: maintainer-clean - Remove almost everything that can be re-generated.
maintainer-clean: dist-clean
rm -rf node_modules/
#: gh-pages-commit - Commit generated website into gh-pages branch.
gh-pages-commit:
$(GHP) -n public/
# gh-pages-push - Travis pushes gh-pages branch on Github.
gh-pages-push:
@git push -fq https://${GH_TOKEN}@github.com/$(TRAVIS_REPO_SLUG).git gh-pages > /dev/null