Quick Start
Your First Jakefile
Section titled “Your First Jakefile”Create a file named Jakefile in your project root:
# A simple greetingtask hello: echo "Hello from Jake!"Run it:
$ jake hello-> helloHello from Jake!Listing Recipes
Section titled “Listing Recipes”$ jake --listAvailable recipes: hello [task]Setting a Default
Section titled “Setting a Default”@defaulttask build: echo "Building..."Now jake with no arguments runs build.
Adding Dependencies
Section titled “Adding Dependencies”task build: echo "Building..."
task test: [build] echo "Testing..."
task deploy: [build, test] echo "Deploying..."Running jake deploy executes: build → test → deploy
Using Variables
Section titled “Using Variables”app_name = "myapp"version = "1.0.0"
task info: echo "{{app_name}} v{{version}}"Parameters
Section titled “Parameters”task greet name="World": echo "Hello, {{name}}!"$ jake greet name=AliceHello, Alice!File Targets
Section titled “File Targets”Only rebuild when sources change:
file dist/bundle.js: src/**/*.ts esbuild src/index.ts --bundle --outfile=dist/bundle.jsWatch Mode
Section titled “Watch Mode”Re-run on file changes:
jake -w buildParallel Execution
Section titled “Parallel Execution”Run independent tasks concurrently:
jake -j4 allComplete Example
Section titled “Complete Example”# Variablesapp_name = "myapp"
# Load .env file@dotenv
# Default task@defaulttask build: @description "Build the application" cargo build --release
# Task with dependenciestask test: [build] cargo test
# File targetfile dist/app: src/**/*.rs cargo build --release cp target/release/{{app_name}} dist/app
# Conditional logictask deploy: [build, test] @confirm "Deploy to production?" @if env(CI) ./scripts/deploy-ci.sh @else ./scripts/deploy-local.sh @end