just language preview
1. Build and test recipes
recipe dependencies, variables, and default parameters
horizon-dark
# variables
target := env_var_or_default("TARGET", "release")
build target=target:
cargo build --{{target}}
# run tests after building
test: build
cargo test
# a function call as an inline parameter default
serve port=env_var_or_default("PORT", "8080"):
python3 -m http.server {{port}} atom-one-dark
# variables
target := env_var_or_default("TARGET", "release")
build target=target:
cargo build --{{target}}
# run tests after building
test: build
cargo test
# a function call as an inline parameter default
serve port=env_var_or_default("PORT", "8080"):
python3 -m http.server {{port}} github-dark
# variables
target := env_var_or_default("TARGET", "release")
build target=target:
cargo build --{{target}}
# run tests after building
test: build
cargo test
# a function call as an inline parameter default
serve port=env_var_or_default("PORT", "8080"):
python3 -m http.server {{port}} dracula
# variables
target := env_var_or_default("TARGET", "release")
build target=target:
cargo build --{{target}}
# run tests after building
test: build
cargo test
# a function call as an inline parameter default
serve port=env_var_or_default("PORT", "8080"):
python3 -m http.server {{port}} nord
# variables
target := env_var_or_default("TARGET", "release")
build target=target:
cargo build --{{target}}
# run tests after building
test: build
cargo test
# a function call as an inline parameter default
serve port=env_var_or_default("PORT", "8080"):
python3 -m http.server {{port}} github
# variables
target := env_var_or_default("TARGET", "release")
build target=target:
cargo build --{{target}}
# run tests after building
test: build
cargo test
# a function call as an inline parameter default
serve port=env_var_or_default("PORT", "8080"):
python3 -m http.server {{port}} 2. Interpolation and attributes
string interpolation, attributes, and shebang recipes
horizon-dark
[private]
[confirm]
deploy env="staging":
echo "deploying to {{env}}"
[no-cd]
python-script:
#!/usr/bin/env python3
print("hello from just") atom-one-dark
[private]
[confirm]
deploy env="staging":
echo "deploying to {{env}}"
[no-cd]
python-script:
#!/usr/bin/env python3
print("hello from just") github-dark
[private]
[confirm]
deploy env="staging":
echo "deploying to {{env}}"
[no-cd]
python-script:
#!/usr/bin/env python3
print("hello from just") dracula
[private]
[confirm]
deploy env="staging":
echo "deploying to {{env}}"
[no-cd]
python-script:
#!/usr/bin/env python3
print("hello from just") nord
[private]
[confirm]
deploy env="staging":
echo "deploying to {{env}}"
[no-cd]
python-script:
#!/usr/bin/env python3
print("hello from just") github
[private]
[confirm]
deploy env="staging":
echo "deploying to {{env}}"
[no-cd]
python-script:
#!/usr/bin/env python3
print("hello from just") 3. Modules, imports, and aliases
export, set, import, mod, and alias keywords
horizon-dark
export DATABASE_URL := "postgres://localhost/dev"
set shell := ["bash", "-cu"]
import "shared.just"
mod docker
alias b := build
build:
cargo build atom-one-dark
export DATABASE_URL := "postgres://localhost/dev"
set shell := ["bash", "-cu"]
import "shared.just"
mod docker
alias b := build
build:
cargo build github-dark
export DATABASE_URL := "postgres://localhost/dev"
set shell := ["bash", "-cu"]
import "shared.just"
mod docker
alias b := build
build:
cargo build dracula
export DATABASE_URL := "postgres://localhost/dev"
set shell := ["bash", "-cu"]
import "shared.just"
mod docker
alias b := build
build:
cargo build nord
export DATABASE_URL := "postgres://localhost/dev"
set shell := ["bash", "-cu"]
import "shared.just"
mod docker
alias b := build
build:
cargo build github
export DATABASE_URL := "postgres://localhost/dev"
set shell := ["bash", "-cu"]
import "shared.just"
mod docker
alias b := build
build:
cargo build