This repository was archived by the owner on Feb 24, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (40 loc) · 1.25 KB
/
Makefile
File metadata and controls
53 lines (40 loc) · 1.25 KB
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
URL := "friendlycode.org"
.PHONY: all
all: build
.PHONY: ci
ci: build
# INSTALL ######################################################################
VENDOR_DIR := ~/.vendor/homepage
INSTALLED_FLAG := $(VENDOR_DIR)/.installed
.PHONY: install
install: $(INSTALLED_FLAG)
$(INSTALLED_FLAG): Gemfile Gemfile.lock Makefile
bundle install --path $(VENDOR_DIR)
npm install react-tools
@ touch $(INSTALLED_FLAG) # indicate that dependencies are installed
.PHONY: update
update: install
bundle update
npm update react-tools
@ touch $(INSTALLED_FLAG) # indicate that dependencies are installed
# BUILD ########################################################################
.PHONY: build
build: install
jsx _src/ dist/js/ --no-cache-dir
bundle exec jekyll build --quiet
echo ${URL} > _site/CNAME
bundle exec htmlproof _site --href-ignore "#"
# RUN ##########################################################################
.PHONY: run
run: install
bundle exec jekyll serve --host 0.0.0.0 --port 4000
.PHONY: launch
launch: build
eval "sleep 5; open http://localhost:4000" & make run
# CLEAN ########################################################################
.PHONY: clean
clean:
rm -rf .bundle $(VENDOR_DIR)
rm -rf _site
rm -rf node_modules
rm -rf dist