2022-12-10 00:31:53 +00:00
|
|
|
APP=sway-ipc
|
|
|
|
BOOTSTRAP=v5.2.3
|
|
|
|
JQUERY=3.6.0
|
|
|
|
INTER=3.19
|
|
|
|
PREFIX=/usr/local
|
|
|
|
|
2022-11-25 20:14:17 +00:00
|
|
|
run:
|
|
|
|
cargo run
|
|
|
|
|
|
|
|
build:
|
2022-11-27 05:26:57 +00:00
|
|
|
cargo build
|
|
|
|
|
2022-11-30 18:41:44 +00:00
|
|
|
test:
|
|
|
|
cargo test
|
|
|
|
|
|
|
|
doc:
|
|
|
|
cargo doc
|
|
|
|
|
2022-11-27 05:26:57 +00:00
|
|
|
clean:
|
2022-12-10 00:31:53 +00:00
|
|
|
rm -rf target/
|
|
|
|
|
|
|
|
clean-assets:
|
|
|
|
rm -rf ./assets/stylesheets
|
|
|
|
rm -rf $(shell find ./assets/javascript -maxdepth 1 -type f -name "*" ! -name "application.js")
|
|
|
|
rm -rf ./assets/fonts
|
|
|
|
rm -rf ./scss/bootstrap
|
|
|
|
|
|
|
|
clone-bootstrap:
|
|
|
|
ifeq ($(shell test ! -e ./scss/bootstrap && echo -n yes),yes)
|
|
|
|
git clone --quiet --depth=1 https://github.com/twbs/bootstrap.git -b $(BOOTSTRAP) ./scss/bootstrap
|
|
|
|
endif
|
|
|
|
|
|
|
|
css: clone-bootstrap
|
|
|
|
install -dm755 -- ./static/stylesheets
|
|
|
|
sassc --style compressed scss/application.scss > static/stylesheets/application.css
|
|
|
|
|
|
|
|
bootstrap: clone-bootstrap
|
|
|
|
install -dm755 -- ./static/stylesheets
|
|
|
|
install -dm755 -- ./static/javascript
|
|
|
|
install -m664 -- ./scss/bootstrap/dist/css/bootstrap.min.css ./static/stylesheets/
|
|
|
|
install -m664 -- ./scss/bootstrap/dist/css/bootstrap.min.css.map ./static/stylesheets/
|
|
|
|
install -m664 -- ./scss/bootstrap/dist/js/bootstrap.bundle.min.js ./static/javascript/
|
|
|
|
rm -f ./static/javascript/jquery-$(JQUERY).slim.min.js
|
|
|
|
wget -4 -P ./static/javascript/ https://code.jquery.com/jquery-$(JQUERY).slim.min.js
|
|
|
|
|
|
|
|
fonts: clean-fonts
|
|
|
|
wget https://github.com/rsms/inter/releases/download/v$(INTER)/Inter-$(INTER).zip
|
|
|
|
unzip Inter-$(INTER).zip -d Inter-$(INTER)
|
|
|
|
install -dm755 -- ./static/fonts
|
|
|
|
install -dm755 -- ./static/stylesheets
|
|
|
|
install -m664 -- Inter-$(INTER)/Inter\ Web/*.woff ./static/fonts/
|
|
|
|
install -m664 -- Inter-$(INTER)/Inter\ Web/*.woff2 ./static/fonts/
|
|
|
|
install -m664 -- Inter-$(INTER)/Inter\ Web/inter.css ./static/stylesheets/
|
|
|
|
sed -i 's/url(\"/url(\"\/public\/fonts\//g' ./static/stylesheets/inter.css
|
|
|
|
rm -rf ./Inter*
|
|
|
|
|
|
|
|
clean-fonts:
|
|
|
|
rm -rf ./static/fonts
|
|
|
|
rm -rf ./Inter*
|
|
|
|
rm -rf ./static/stylesheets/inter.css
|