scroll/justfile
Timothy J. Warren d7bf8801c9
Some checks failed
timw4mail/scroll/pipeline/head There was a failure building this commit
Put the important scripts package.json so they can be run without Just
2024-07-10 16:32:28 -04:00

93 lines
1.9 KiB
Makefile

# Lists the available actions
default:
@just --list
# Test coverage
coverage: deno-coverage bun-coverage
# Typescript checking
check: deno-check bun-check
# Generate source docs
docs:
deno doc --html --name="Scroll" ./src/scroll.ts ./src/common/*.ts ./src/deno/mod.ts ./src/bun/mod.ts ./src/tsx/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:
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}}