forked from go-shiori/shiori
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.sh
executable file
·24 lines (20 loc) · 860 Bytes
/
styles.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
INPUT_STYLECSS=internal/view/assets/less/style.less
OUTPUT_STYLECSS=internal/view/assets/css/style.css
INPUT_ARCHIVECSS=internal/view/assets/less/archive.less
OUTPUT_ARCHIVECSS=internal/view/assets/css/archive.css
# Use bun is installled
if [ -x "$(command -v bun)" ]; then
bun install
bun x prettier internal/view/ --write
bun x lessc $INPUT_STYLECSS $OUTPUT_STYLECSS
bun x lessc $INPUT_ARCHIVECSS $OUTPUT_ARCHIVECSS
bun x clean-css-cli $CLEANCSS_OPTS -o $OUTPUT_STYLECSS $OUTPUT_STYLECSS
bun x clean-css-cli $CLEANCSS_OPTS -o $OUTPUT_ARCHIVECSS $OUTPUT_ARCHIVECSS
exit 0
fi
# Default to lessc and cleancss
lessc $INPUT_STYLECSS $OUTPUT_STYLECSS
lessc $INPUT_ARCHIVECSS $OUTPUT_ARCHIVECSS
cleancss $CLEANCSS_OPTS -o $OUTPUT_STYLECSS $OUTPUT_STYLECSS
cleancss $CLEANCSS_OPTS -o $OUTPUT_ARCHIVECSS $OUTPUT_ARCHIVECSS