GitCorner

Code

ossartcraftcraftanything🌐
642d5a256791
# Project build/test commands and optional launch recipes, in detection order.
# Launch recipes match a project file and pass argv directly, never through a shell.
# {file} is replaced with the matched file; wildcard launch matches must be unique.

[[toolchain]]
name = "Rust"
found_by = ["Cargo.toml"]
build = ["cargo", "build", "--quiet"]
test = ["cargo", "test", "--quiet"]

[[toolchain]]
name = "Node.js"
found_by = ["package.json"]
build = ["npm", "run", "build", "--if-present"]
test = ["npm", "test"]
test_script = "test"
no_tests = ['echo "Error: no test specified" && exit 1']
windows_program = "npm.cmd"

[[toolchain]]
name = "Python"
found_by = ["pyproject.toml", "requirements.txt", "setup.py"]
standalone_entrypoints = true
python_console_script = true
build = ["python3", "-m", "compileall", "-q", "-f", "-x", '[\\/](\.?venv|node_modules|\.git)[\\/]', "."]
test = ["python3", "-m", "pytest", "-q", "-p", "no:cacheprovider"]
no_tests = ["no tests ran", "No module named pytest"]
local_programs = [".venv/bin/python", "venv/bin/python", ".venv/Scripts/python.exe", "venv/Scripts/python.exe"]
windows_program = "python"
launch = [
    { file = "main.py", command = ["python3", "{file}"] },
    { file = "app.py", command = ["python3", "{file}"] },
    { file = "__main__.py", command = ["python3", "."] },
    { file = "*/__main__.py", command = ["python3", "-m", "{module}"] },
]

[[toolchain]]
name = "Go"
found_by = ["go.mod"]
build = ["go", "build", "./..."]
test = ["go", "test", "./..."]
launch = [
    { file = "main.go", command = ["go", "run", "."] },
    { file = "cmd/*/main.go", command = ["go", "run", "{package}"] },
]

[[toolchain]]
name = ".NET"
found_by = ["*.sln", "*.csproj"]
build = ["dotnet", "build", "--nologo", "-v", "q"]
test = ["dotnet", "test", "--nologo", "-v", "q"]
launch = [{ file = "*.csproj", command = ["dotnet", "run", "--no-build", "--project", "{file}", "--"] }]

[[toolchain]]
name = "Maven"
found_by = ["pom.xml"]
# `package` rather than `compile`, so Play starts the jar of this build and not an older one.
build = ["mvn", "-q", "-B", "package", "-DskipTests"]
test = ["mvn", "-q", "-B", "test"]
local_programs = ["mvnw", "mvnw.cmd"]
launch = [{ file = "target/*.jar", command = ["java", "-jar", "{file}"], runnable_jar = true }]

[[toolchain]]
name = "Gradle"
found_by = ["build.gradle", "build.gradle.kts"]
build = ["gradle", "-q", "assemble"]
test = ["gradle", "-q", "test"]
local_programs = ["gradlew", "gradlew.bat"]
launch = [{ file = "build/libs/*.jar", command = ["java", "-jar", "{file}"], runnable_jar = true }]

[[toolchain]]
name = "Make"
found_by = ["Makefile"]
build = ["make"]
test = ["make", "test"]
no_tests = ["make: *** No rule to make target `test'.", "make: *** No rule to make target 'test'.", "make: don't know how to make test."]