You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -63,20 +63,34 @@ Download the appropriate binary for your platform from the [releases page](https
63
63
64
64
## Quick Start
65
65
66
-
Create a `config.pace` file in your project root:
66
+
### Auto-generate Configuration (Recommended)
67
+
68
+
Let Pace automatically generate a configuration for your project:
69
+
70
+
```bash
71
+
cd your-project
72
+
pace init
73
+
```
74
+
75
+
Pace will detect your project type (Go, Node.js, Python, Rust) and create an optimized `config.pace` with appropriate tasks, caching, and file patterns.
76
+
77
+
### Manual Configuration
78
+
79
+
Alternatively, create a `config.pace` file in your project root:
67
80
68
81
```pace
69
82
default build
70
83
71
-
task build {
84
+
task build [b] {
72
85
description "Build the project"
73
86
command "go build -o bin/app main.go"
74
-
before ["test"]
75
-
inputs ["**/*.go"]
76
-
outputs ["bin/app"]
87
+
requires [test]
88
+
inputs [**/*.go]
89
+
outputs [bin/app]
90
+
cache true
77
91
}
78
92
79
-
hook "test" {
93
+
hook test {
80
94
description "Run tests"
81
95
command "go test ./..."
82
96
}
@@ -111,7 +125,26 @@ task build {
111
125
112
126
### Aliases
113
127
114
-
Create shortcuts for tasks:
128
+
Create shortcuts for tasks using inline syntax:
129
+
130
+
```pace
131
+
task build [b] {
132
+
description "Build the application"
133
+
command "go build -o bin/app main.go"
134
+
}
135
+
136
+
task test [t] {
137
+
description "Run tests"
138
+
command "go test ./..."
139
+
}
140
+
141
+
task dev [d] {
142
+
description "Start development server"
143
+
command "go run main.go"
144
+
}
145
+
```
146
+
147
+
Or use standalone alias statements:
115
148
116
149
```pace
117
150
alias b build
@@ -128,35 +161,55 @@ pace run b # same as: pace run build
128
161
### Task Properties
129
162
130
163
```pace
131
-
task example {
132
-
description "Example task"
164
+
task example [ex] {
165
+
description "Example task with all properties"
133
166
command "echo 'Hello World'"
134
167
135
-
before ["setup"]
136
-
after ["cleanup"]
137
-
on_success ["notify"]
138
-
on_failure ["alert"]
139
-
140
-
inputs ["src/**/*.go", "go.mod"]
141
-
outputs ["bin/app"]
142
-
143
-
cache true
144
-
timeout "10m"
145
-
retry 3
146
-
retry_delay "5s"
147
-
148
-
working_dir "src"
168
+
# Dependencies and hooks
169
+
depends-on [other-task] # Tasks that must complete before this one
170
+
requires [setup] # Hooks to run before task
171
+
triggers [cleanup] # Hooks to run after task
172
+
on_success [notify] # Hooks to run on success
173
+
on_failure [alert] # Hooks to run on failure
174
+
175
+
# File tracking for caching
176
+
inputs [src/**/*.go, go.mod]
177
+
outputs [bin/app]
178
+
179
+
# Performance and behavior
180
+
cache true # Enable smart caching
181
+
timeout "10m" # Maximum execution time
182
+
retry 3 # Number of retry attempts
183
+
retry_delay "5s" # Delay between retries
184
+
185
+
# Execution environment
186
+
working_dir "src" # Working directory for command
149
187
env {
150
-
"NODE_ENV" "production"
151
-
"DEBUG" "false"
188
+
NODE_ENV = production
189
+
DEBUG = false
152
190
}
153
191
154
-
silent false
155
-
parallel false
156
-
continue_on_error false
192
+
# Conditional execution
193
+
when "platform == linux" # Only run on Linux
194
+
195
+
# Flags
196
+
silent false # Suppress output
197
+
parallel false # Run dependencies in parallel
198
+
continue_on_error false # Continue if task fails
199
+
watch false # Enable file watching
157
200
}
158
201
```
159
202
203
+
**Property Defaults:**
204
+
-`cache`: false
205
+
-`parallel`: false
206
+
-`silent`: false
207
+
-`continue_on_error`: false
208
+
-`watch`: false
209
+
-`retry`: 0
210
+
211
+
**Note:** You can use identifiers or strings in arrays. Arrays support both `[item1, item2]` and `["item1", "item2"]` syntax.
212
+
160
213
### Arguments
161
214
162
215
Pass arguments to tasks:
@@ -245,48 +298,68 @@ Syntax highlighting for `.pace` files is available. Check the [vscode-pace](vsco
0 commit comments