scroll/justfile
Timothy J. Warren 4be7be09a7
All checks were successful
timw4mail/scroll/pipeline/head This commit looks good
Fix some issues with line splitting/merging
2024-07-10 16:12:39 -04:00

88 lines
2.0 KiB
Makefile

# Lists the available actions
default:
@just --list
# Test coverage
coverage: bun-test deno-coverage
# Typescript checking
check: deno-check bun-check tsx-check
docs:
deno doc --html --unstable-ffi --name="Scroll" ./src/scroll.ts ./src/common/*.ts ./src/deno/mod.ts ./src/bun/mod.ts
# Reformat the code
fmt:
deno fmt
# Run tests with all the runtimes
test: deno-test tsx-test bun-test
# Run all code-quality related tasks
quality: check test
# Clean up any generated files
clean:
rm -f test.file
rm -rf .deno-cover
rm -rf coverage
rm -rf docs
rm -f scroll*.log
rm -f test.file
rm -f tsconfig.tsbuildinfo
##########################################################################################
# Bun-specific commands
##########################################################################################
# Check code with actual Typescript compiler
bun-check:
bunx tsc
# Test with bun
bun-test:
bun test --coverage
# Run with bun
bun-run file="":
bun run ./src/scroll.ts {{file}}
##########################################################################################
# Deno-specific commands
##########################################################################################
# Lint code and check types
deno-check:
deno task deno-lint
deno task deno-check
# Test with deno
deno-test:
deno test --allow-all --unstable-ffi
# Create test coverage report with deno
deno-coverage:
./coverage.sh
# Run with deno
deno-run file="":
deno task deno-run {{file}}
#deno run --allow-all --allow-ffi --deny-hrtime --unstable-ffi ./src/scroll.ts {{file}}
##########################################################################################
# tsx(Node JS)-specific commands
##########################################################################################
# Check code with actual Typescript compiler
tsx-check:
npm run tsx-check
# Test with tsx (NodeJS)
tsx-test:
npm run tsx-test
# Run with tsx (NodeJS)
tsx-run file="":
npx tsx ./src/scroll.ts {{file}}