test/Makefile.toml

46 lines
837 B
TOML

# Build the package.
[tasks.build]
clear = true
dependencies = ["clean", "lint", "test", "build-types", "build-js"]
# Build the JavaScript.
[tasks.build-js]
clear = true
command = "pnpm"
args = ["tsx", "esbuild.ts"]
# Build the TypeScript type declarations.
[tasks.build-types]
clear = true
command = "pnpm"
args = ["tsc"]
# Clean the build directory.
[tasks.clean]
clear = true
command = "pnpm"
args = ["trash", "build/"]
# Run the full set of linting and testing.
[tasks.lint]
clear = true
dependencies = ["lint-js", "test"]
# Lint the TypeScript using XO.
[tasks.lint-js]
clear = true
command = "pnpm"
args = ["xo"]
# Run the tests.
[tasks.test]
clear = true
command = "pnpm"
args = ["tsx", "tests/index.ts"]
# Start a live-reloading server that watches for changes.
[tasks.watch]
clear = true
command = "pnpm"
args = ["vite"]