馃悕馃悕馃悕
1
2if [ -z "$1" ]; then
3 TARGET="sites/local"
4else
5 TARGET="sites/$1"
6fi
7
8mkdir sites/_deploy/content
9cp -ans "$(pwd)/$TARGET"/content/* sites/_deploy/content/
10cp -ans "$(pwd)"/common/* sites/_deploy/content/
11
12ln -s "$(pwd)/$TARGET/wrangler.jsonc" "./sites/_deploy/wrangler.jsonc"
13
14cd sites/_deploy || exit
15
16npx wrangler dev --live-reload --ip 0.0.0.0 --port 1313 --local-protocol https
17
18cd - || exit
19
20rm sites/_deploy/wrangler.jsonc
21rm -rf sites/_deploy/content