generated from hrbrmstr/slightly-more-than-minimal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
64 lines (51 loc) · 1.45 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
57
58
59
60
61
62
63
64
# This is a justfile (https://github.com/casey/just)
# Good cheatsheet (https://cheatography.com/linux-china/cheat-sheets/justfile/)
# project dir
project := "r-template-tag-function"
# where to sync ./build
syncDest := "rud.is:~/rud.is/w/" + project + "/"
# default recipe to display help information
default:
@just --list
# This is a justfile (https://github.com/casey/just)
# install exmd
install-exmd:
@npm install -g hrbrmstr/exmd
# render index.html
render:
@exmd index.md
# install/update miniserve
install-miniserve:
cargo install miniserve
# serve project (requires miniserve)
serve:
@miniserve \
--header "Cache-Control: no-cache; max-age=1" \
--header "Cross-Origin-Embedder-Policy: require-corp" \
--header "Cross-Origin-Opener-Policy: same-origin" \
--header "Cross-Origin-Resource-Policy: cross-origin" \
--index index.html \
.
browse:
@open -a "Google Chrome Beta" http://localhost:8080/
# serve project (requires miniserve)
serve-build:
@miniserve \
--header "Cache-Control: no-cache; max-age=1" \
--header "Cross-Origin-Embedder-Policy: require-corp" \
--header "Cross-Origin-Opener-Policy: same-origin" \
--header "Cross-Origin-Resource-Policy: cross-origin" \
--index index.html \
build
# sync to server
rsync:
rsync -avp ./build/ {{syncDest}}
# publish to GH
github:
@git add -A
@git commit -m "chore: lazy justfile commit"
@git push
# be environmentally conscious
rollup:
@rm -rf build/
@npx rollup --config