forked from FeatherCMS/feather
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (32 loc) · 973 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
CUR_DIR = $(CURDIR)
run:
swift run Feather
env:
echo 'BASE_URL="http://0.0.0.0:8080"' > .env.development
echo 'BASE_PATH="$(CUR_DIR)/"' >> .env.development
env.testing:
echo 'BASE_URL="http://0.0.0.0:8080"' > .env.testing
echo 'BASE_PATH="$(CUR_DIR)/"' >> .env.testing
clean:
rm -rf ./db.sqlite ./Resources/ ./Public/
test: env.testing
swift test --enable-test-discovery
css:
cat Public/css/frontend.css \
| tr -d '\n' \
| tr -d '\t' \
| tr -s ' ' \
| sed -E 's/[[:space:]]*:[[:space:]]*/:/g' \
| sed -E 's/[[:space:]]*,[[:space:]]*/,/g' \
| sed -E 's/[[:space:]]*\{[[:space:]]*/{/g' \
| sed -E 's/[[:space:]]*\}[[:space:]]*/}/g' \
| sed -E 's/[[:space:]]*>[[:space:]]*/>/g' \
| sed -E 's/[[:space:]]*;[[:space:]]*/;/g' \
> Public/css/frontend.min.css
install: css
swift package update
swift build -c release
install .build/Release/Feather ./feather #./usr/local/bin/feather
uninstall:
rm Public/css/frontend.min.css
rm ./feather