-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjustfile
More file actions
67 lines (54 loc) · 1.44 KB
/
Copy pathjustfile
File metadata and controls
67 lines (54 loc) · 1.44 KB
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
65
66
set shell := ["zsh", "-cu"]
# set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]
default: homebrew finish
# 升級 homebrew
homebrew:
-brew update
-brew upgrade --greedy-latest
# 升級 vim 套件
vim:
-nvim --headless "+Lazy! sync" +qa
-nvim --headless "+MasonUpdateAll" +qa
# 升級 mise
mise:
-@mise self-update
-mise plugin update --all
# 升級 npm global 套件
npm:
# @npm update -g npm
-npm update -g
# 設定整個開發環境
bootstrap: ensure-brew install-tools setup-config
@echo "🎉 Development environment ready!"
# 確保 brew 存在,不存在就安裝
[private]
ensure-brew:
#!/usr/bin/env bash
if ! command -v brew >/dev/null 2>&1; then
echo "📦 Installing Homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
else
echo "✓ Homebrew already installed"
fi
[private]
install-tools: ensure-brew
brew install git gh fzf fd ripgrep
[private]
setup-config:
# @# 設定 dotfiles 之類的
[private]
finish:
@printf '\n%.0s' {1,3}
@printf '%.s─' $(seq 1 $(tput cols))
@printf '%.s─' $(seq 1 $(tput cols))
@printf '\n%.0s' {1,3}
@fortune | $(just onesay)
[private]
onesay:
@if command -v pokemonsay >/dev/null 2>&1; then \
echo pokemonsay; \
elif command -v cowsay >/dev/null 2>&1; then \
echo cowsay; \
else \
echo echo; \
fi