scroll/justfile
Timothy J. Warren 8b44e250e2
All checks were successful
timw4mail/scroll/pipeline/head This commit looks good
Refactor again
2024-07-25 11:47:44 -04:00

101 lines
2.1 KiB
Makefile

# Lists the available actions
default:
@just --list
# Test coverage
coverage: deno-coverage bun-coverage
# Generate test coverage and open report in default browser
open-coverage: coverage
open coverage/index.html
# Typescript checking
check: deno-check bun-check
# Generate source docs
docs:
deno doc --html --name="Scroll" ./src/common/*.ts ./src/common/**/*.ts
# Generate source docs and open in default browser
open-docs: docs
open docs/all_symbols.html
# 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:
bun run bun-check
# Test with bun
bun-test:
bun run bun-test
# CLI test coverage report
bun-coverage:
bun run bun-coverage
# Run with bun
bun-run file="":
bun run bun-run {{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 task deno-test
# Create test coverage report with deno
deno-coverage:
deno task deno-coverage
# Run with deno
deno-run file="":
deno task deno-run {{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="":
npm run tsx-run {{file}}