-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
64 lines (54 loc) · 1.38 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
[email protected]:/var/www/virtual/floppnet/flopp.net/
[email protected]:/var/www/virtual/floppnet/2oc.de/
BUILD_DATE=$(shell date +%s)
.PHONY: setup
setup:
npm install .
.PHONY: spell
spell:
./node_modules/.bin/cspell \
--config .cspell.json \
src/**/*.html \
src/**/*.ts \
src/**/*.scss
.PHONY: lint
lint:
./node_modules/.bin/tslint \
--project tsconfig.json \
--config tslint.json \
src/*.ts \
src/**/*.ts
./node_modules/.bin/prettier \
--check \
src/*.ts \
src/**/*.ts
.PHONY: format
format:
./node_modules/.bin/prettier \
--write \
src/*.ts \
src/**/*.ts
.PHONY: update-translation
update-translation:
./tools/find-i18n.py \
-t src/lang/en/translation.json \
-t src/lang/de/translation.json \
-t src/lang/fr/translation.json \
src/*.html \
src/*.ts \
src/components/*.ts
.PHONY: run-dev
run-dev:
./node_modules/.bin/webpack serve --open --config webpack.dev.js
.PHONY: build
build:
echo "export const Version = { build_date: ${BUILD_DATE} };" > src/components/version.ts
./node_modules/.bin/webpack --config webpack.prod.js
echo "{ \"build_date\": ${BUILD_DATE} }" > dist/version.json
cp src/.htaccess dist/
.PHONY: upload
upload: build
(cd dist && rsync -v -r --delete . ${UPLOAD_TARGET})
.PHONY: upload-dev
upload-dev: build
(cd dist && rsync -v -r --delete . ${UPLOAD_TARGET_DEV})