-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
52 lines (41 loc) · 887 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
45
46
47
48
49
50
51
52
NPM_BIN = node_modules/.bin
ENB = $(NPM_BIN)/enb
BOWER = $(NPM_BIN)/bower
ifneq ($(YENV),production)
YENV=development
endif
.PHONY: hljs
hljs:
mkdir -p _/$@
for i in `find common.blocks/highlight/styles -type f -name '*.css'`; do \
$(NPM_BIN)/borschik -i $$i -o _/$@/`basename $$i`; \
done
_/hljs: hljs
.PHONY: server
server: npm_deps bower_deps build
$(ENB) server
.PHONY: buildild
build: npm_deps bower_deps _/hljs
$(ENB) make --no-cache
$(MAKE) $(YENV)-postbuild
.PHONY: $(YENV)-postbuild
development-postbuild:
$(info ---> $(YENV) postbuild)
production-postbuild:
$(info ---> $(YENV) postbuild)
find _ \
-name *.css -o \
-name *.js -o \
-name *.svg \
| xargs zopfli --i15
.PHONY: clean
clean: npm_deps
rm -rf _
$(ENB) make clean
.PHONY: bower_deps
bower_deps: npm_deps
$(BOWER) install
.PHONY: npm_deps
npm_deps:
npm install
.DEFAULT_GOAL = server