-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
70 lines (58 loc) · 1.9 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
70
PROJECT_NAME=project
MANAGE=python manage.py
SETTINGS=--settings=$(PROJECT_NAME).settings.test
PLEX_VERSION=1.3.1
FOUNDATION_VERSION=6.5.3
JQUERY_VERSION=3.4.1
.PHONY: test clean lint sync-media css css-watch
server:
$(MANAGE) runserver
shell:
$(MANAGE) shell_plus
test:
pytest
clean:
rm -rf .coverage cover sources
find . -name '*.pyc' -exec rm '{}' ';'
lint:
-@flake8 .
sync-media:
rsync -av webcamp:web/conference-web/project/media/ project/media/
sources:
curl https://github.com/IBM/plex/releases/download/v$(PLEX_VERSION)/Web.zip \
-o sources/tmp/plex.zip --location --create-dirs
curl https://github.com/zurb/foundation/archive/v$(FOUNDATION_VERSION).zip \
-o sources/tmp/foundation.zip --location --create-dirs
curl https://code.jquery.com/jquery-$(JQUERY_VERSION).min.js \
-o sources/jquery/jquery.min.js --location --create-dirs
curl https://code.jquery.com/jquery-$(JQUERY_VERSION).min.map \
-o sources/jquery/jquery.min.map --location --create-dirs
unzip sources/tmp/plex.zip -d sources/tmp/plex/
unzip sources/tmp/foundation.zip -d sources/tmp/foundation/
mv sources/tmp/plex/Web sources/plex
mv sources/tmp/foundation/foundation-sites-$(FOUNDATION_VERSION) sources/foundation
rm -r sources/tmp
dist:
rm -rf ui/dist/fonts ui/dist/scripts ui/dist/styles
mkdir -p ui/dist/fonts
mkdir -p ui/dist/scripts
mkdir -p ui/dist/styles
cp -r sources/plex/IBM-Plex-Mono ui/dist/fonts
cp sources/foundation/dist/js/foundation.min.js ui/dist/scripts
cp sources/foundation/dist/js/foundation.min.js.map ui/dist/scripts
cp sources/jquery/jquery.min.js ui/dist/scripts
cp sources/jquery/jquery.min.map ui/dist/scripts
make css
css:
sassc \
--sourcemap \
--load-path=. \
--load-path=sources/plex/scss/ \
--load-path=sources/foundation/scss \
ui/styles/style.scss \
ui/dist/styles/style.css
css-watch:
make css
@while true; do \
inotifywait -qre close_write ui/styles; make css; \
done