-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathjustfile
56 lines (45 loc) · 1.36 KB
/
justfile
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
# Change this if you want to use a different folder name or if you have renamed the folder
quartz-folder-name := 'quartz'
quartz-path := path_exists(clean(join(justfile_directory(), '..', quartz-folder-name, 'quartz', 'styles')))
error-quartz-not-found := 'Quartz not found. Please make sure you are in the right folder or set the correct folder name in the justfile\n\nQuartz folder is currently set to:'
quartz-path-example := '\nThe Folder structure should look like this:\n\nsomeFolder/\n quartz/ (your quartz repository)\n quartz/\n styles/\n quartz-themes/ (this repository)'
test-theme-path := ''
set quiet
[doc('List all available commands'), private]
default:
@just --list
[private]
alias c := check
[private]
alias t := theme
[private]
alias u := update
[private]
verify:
npx prettier . --check
[private]
build:
node __CONVERTER/convert.js
[private]
format:
npx prettier . --write
[private]
compile: build format
[doc('Update themes')]
update:
git pull
[doc('Check for updates')]
check:
git fetch
git status
[doc('Set theme')]
theme +name:
#!/usr/bin/env sh
if ! '{{quartz-path}}'; then
echo '{{quartz-path}}'
echo '{{error-quartz-not-found}}' '{{quartz-folder-name}}'
echo '{{quartz-path-example}}'
exit 1
fi
echo 'Setting theme "{{name}}"'
node set-theme.js "{{replace(trim(lowercase(name)), ' ', '-')}}" "{{quartz-folder-name}}"