-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevbox.json
More file actions
156 lines (156 loc) Β· 4.93 KB
/
devbox.json
File metadata and controls
156 lines (156 loc) Β· 4.93 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
{
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.16.0/.schema/devbox.schema.json",
"packages": [
"go@1.24.2",
"nodejs@latest",
"git@latest"
],
"env": {
"GOPATH": "$HOME/go",
"PATH": "$PATH:$GOPATH/bin:$PWD/node_modules/.bin",
"CGO_ENABLED": "1"
},
"shell": {
"init_hook": [
"echo 'π Welcome to go-sonr/ui development environment!' > /dev/null",
"echo 'Installing Go tools...' > /dev/null",
"go install github.com/a-h/templ/cmd/templ@v0.3.943 2>/dev/null || true",
"go install github.com/air-verse/air@latest 2>/dev/null || true",
"go install github.com/templui/templui/cmd/templui@latest 2>/dev/null || true",
"echo 'Installing Node dependencies...' > /dev/null",
"if [ ! -f node_modules/.bin/tailwindcss ]; then npm install -D tailwindcss@next @tailwindcss/cli@next 2>/dev/null || true; fi",
"echo 'β¨ Development environment ready!' > /dev/null",
"echo 'Run \"devbox run help\" to see available commands' > /dev/null"
],
"scripts": {
"help": [
"echo 'π Available Commands:'",
"echo ''",
"echo ' Development:'",
"echo ' devbox run dev - Start development server with hot reload'",
"echo ' devbox run server - Run Go server with hot reload (Air)'",
"echo ' devbox run templ - Watch and generate templ files'",
"echo ' devbox run css - Generate CSS from Tailwind'",
"echo ' devbox run css-watch - Watch CSS files for changes'",
"echo ''",
"echo ' Building:'",
"echo ' devbox run build - Build the Go module'",
"echo ' devbox run all - Run format, generate, css, tidy, lint, build, examples'",
"echo ' devbox run generate - Generate Go code from templ files'",
"echo ' devbox run format - Format Go and templ files'",
"echo ' devbox run lint - Run Go linting'",
"echo ' devbox run tidy - Tidy Go module dependencies'",
"echo ''",
"echo ' Components:'",
"echo ' devbox run add COMPONENT=name - Add a component via templui'",
"echo ' devbox run list - List available templui components'",
"echo ' devbox run update-templ - Update templ to latest version'",
"echo ''",
"echo ' Examples:'",
"echo ' devbox run examples - Build all examples'",
"echo ' devbox run examples-run - Run the server example'",
"echo ' devbox run examples-clean - Clean example binaries'",
"echo ''",
"echo ' Utilities:'",
"echo ' devbox run clean - Remove all generated files'",
"echo ' devbox run test - Run tests'",
"echo ''",
"echo 'π‘ Tip: Use \"make help\" for direct Makefile targets'"
],
"dev": [
"echo 'π Starting development server...'",
"echo 'templ UI: http://localhost:7331'",
"echo 'Go server: http://localhost:8090'",
"echo 'Press Ctrl+C to stop'",
"make dev"
],
"server": [
"echo 'π₯ Starting Go server with hot reload...'",
"make server"
],
"templ": [
"echo 'ποΈ Watching templ files...'",
"make templ"
],
"css": [
"echo 'π¨ Generating CSS with Tailwind...'",
"make css"
],
"css-watch": [
"echo 'ποΈ Watching CSS files...'",
"make css-watch"
],
"build": [
"echo 'π¨ Building Go module...'",
"make build"
],
"all": [
"echo 'ποΈ Running complete build pipeline...'",
"make all"
],
"generate": [
"echo 'βοΈ Generating Go code from templ files...'",
"make generate"
],
"format": [
"echo 'β¨ Formatting code...'",
"make format"
],
"lint": [
"echo 'π Linting code...'",
"make lint"
],
"tidy": [
"echo 'π¦ Tidying Go modules...'",
"make tidy"
],
"clean": [
"echo 'π§Ή Cleaning generated files...'",
"make clean"
],
"add": [
"echo 'β Adding component...'",
"make add COMPONENT=$COMPONENT"
],
"list": [
"echo 'π Listing available components...'",
"make list"
],
"update-templ": [
"echo 'β¬οΈ Updating templ...'",
"make update-templ"
],
"examples": [
"echo 'π Building examples...'",
"make examples"
],
"examples-run": [
"echo 'βΆοΈ Running server example...'",
"make examples-run"
],
"examples-clean": [
"echo 'π§Ή Cleaning example binaries...'",
"make examples-clean"
],
"test": [
"echo 'π§ͺ Running tests...'",
"go test ./..."
],
"install-tools": [
"echo 'π¦ Installing development tools...'",
"go install github.com/a-h/templ/cmd/templ@latest",
"go install github.com/air-verse/air@latest",
"go install github.com/templui/templui/cmd/templui@latest",
"npm install -D tailwindcss@next @tailwindcss/cli@next",
"echo 'β
All tools installed!'"
],
"setup": [
"echo 'π§ Setting up project...'",
"go mod download",
"templui init",
"mkdir -p assets/css assets/js",
"echo 'β
Project setup complete!'"
]
}
}
}