2019-04-23 18:31:01 +08:00
|
|
|
LESS := $(shell npm bin)/lessc
|
|
|
|
APP := app
|
2020-03-10 05:24:31 +08:00
|
|
|
CSS := $(APP)/cyp.css
|
2019-04-23 18:31:01 +08:00
|
|
|
ICONS := $(APP)/js/lib/icons.js
|
|
|
|
SYSD_USER := ~/.config/systemd/user
|
|
|
|
SERVICE := cyp.service
|
|
|
|
|
|
|
|
all: $(CSS)
|
|
|
|
|
|
|
|
icons: $(ICONS)
|
|
|
|
|
|
|
|
$(ICONS): $(APP)/icons/*
|
|
|
|
$(APP)/svg2js.sh $(APP)/icons > $@
|
|
|
|
|
2020-03-10 05:24:31 +08:00
|
|
|
$(CSS): $(APP)/css/* $(APP)/css/elements/*
|
|
|
|
$(LESS) $(APP)/css/cyp.less > $@
|
2019-04-23 18:31:01 +08:00
|
|
|
|
|
|
|
service: $(SERVICE)
|
2019-04-25 20:43:07 +08:00
|
|
|
systemctl --user enable $(PWD)/$(SERVICE)
|
2019-04-23 18:31:01 +08:00
|
|
|
|
|
|
|
$(SERVICE): misc/cyp.service.template
|
|
|
|
cat $^ | envsubst > $@
|
|
|
|
|
|
|
|
watch: all
|
|
|
|
while inotifywait -e MODIFY -r $(APP)/css $(APP)/js ; do make $^ ; done
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(SERVICE) $(CSS)
|
|
|
|
|
2019-10-29 15:49:04 +08:00
|
|
|
docker-image:
|
|
|
|
docker build -t cyp .
|
|
|
|
|
|
|
|
docker-run:
|
|
|
|
docker run --network=host -v "$$(pwd)"/_youtube:/cyp/_youtube cyp
|
|
|
|
|
2019-04-23 18:31:01 +08:00
|
|
|
.PHONY: all watch icons service clean
|