generated from hrbrmstr/slightly-more-than-minimal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
54 lines (45 loc) · 1.42 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
# This is a justfile (https://github.com/casey/just)
# Good cheatsheet (https://cheatography.com/linux-china/cheat-sheets/justfile/)
# project dir
project := "minimal"
# where to sync ./build
syncDest := "rud.is:~/rud.is/w/" + project + "/"
# default recipe to display help information
default:
@just --list
# install/update miniserve
install-miniserve:
cargo install miniserve
# serve project from ./build (requires miniserve)
# --header "Cross-Origin-Opener-Policy: same-origin"
# --header "Cross-Origin-Embedder-Policy: require-corp"
bserve:
miniserve \
--header "Cache-Control: no-cache; max-age=1" \
--header "Cross-Origin-Embedder-Policy: cross-origin" \
--header "Cross-Origin-Opener-Policy: cross-origin" \
--header "Cross-Origin-Resource-Policy: cross-origin" \
--index index.html \
--port 8090 \
build
# serve project (requires miniserve)
# --header "Cross-Origin-Resource-Policy: cross-origin"
serve:
miniserve \
--header "Cache-Control: no-cache; max-age=1" \
--header "Cross-Origin-Embedder-Policy: cross-origin" \
--header "Cross-Origin-Opener-Policy: same-origin" \
--header "Cross-Origin-Resource-Policy: cross-origin" \
--index index.html \
--port 8090 \
.
# open a browser to ^^ (macOS Chrome Beta)
browse:
open -a "Google Chrome Beta" http://localhost:8080/
# sync to server
rsync:
rsync -avp ./build/ {{syncDest}}
# be environmentally conscious
rollup:
rm -rf build/
npx rollup --config