-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
.air.toml
69 lines (60 loc) · 2.47 KB
/
.air.toml
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
67
68
69
# Root directory configuration
root = "." # Set the root directory to the current directory
tmp_dir = "tmp" # Temporary directory for build artifacts
# Build configuration
[build]
# Pre-build command: Compile Tailwind CSS
pre_cmd = [
"""
if command -v tailwindcss >/dev/null 2>&1; then
tailwindcss -i tailwind.input.css -o assets/tailwind.css
elif command -v npx >/dev/null 2>&1; then
npm install -D daisyui
npx --yes tailwindcss@latest -i tailwind.input.css -o assets/tailwind.css
else
echo "Error: Neither 'tailwindcss' binary nor 'npx' found. Please install Tailwind CSS."
exit 1
fi
"""
]
# Main build command
cmd = """
# Enable CGO for TensorFlow Lite integration
export CGO_ENABLED=1
export CGO_CFLAGS="-I${HOME}/src/tensorflow"
export CGO_LDFLAGS="-L/usr/lib -ltensorflowlite_c"
# Build the Go application
go build -v -x -ldflags "-s -w -X main.buildDate=$(date -u +%Y-%m-%dT%H:%M:%SZ)" -o ./tmp/main .
"""
bin = "./tmp/main" # Path to the compiled binary
delay = 1000 # Delay (in milliseconds) before restarting the app after a change
# Directories to exclude from watching
exclude_dir = ["tmp", "vendor", "testdata", "bin"]
exclude_file = [] # Files to exclude from watching (none specified)
exclude_regex = ["_test.go"] # Exclude test files
exclude_unchanged = false # Watch even files that haven't changed
follow_symlink = false # Don't follow symlinks
full_bin = "" # Additional arguments when running the built binary
include_dir = ["views", "internal", "assets"] # Directories to include (watches all if empty)
include_ext = ["go", "tpl", "tmpl", "html", "css", "js"] # File extensions to watch
kill_delay = "0s" # Delay before killing the app on a rebuild
log = "build-errors.log" # File to log build errors
send_interrupt = false # Send interrupt signal before killing the app
stop_on_error = true # Stop restarting if build errors occur
# Color configuration for console output
[color]
app = "" # Default terminal color for app output
build = "yellow"
main = "magenta"
runner = "green"
watcher = "cyan"
# Logging configuration
[log]
time = false # Don't include timestamps in logs
# Miscellaneous settings
[misc]
clean_on_exit = false # Don't clean temporary directory on exit
# Screen settings
[screen]
clear_on_rebuild = false # Don't clear the screen on rebuild
keep_scroll = true # Keep scroll position when output screen is full