scroll/justfile

69 lines
1.5 KiB
Makefile
Raw Normal View History

# Lists the available actions
default:
@just --list
2023-11-20 11:12:22 -05:00
# Test coverage
coverage: bun-test deno-coverage
2023-11-02 13:06:48 -04:00
# Typescript checking
check: deno-check bun-check
docs:
2023-11-10 21:24:47 -05:00
deno doc --html --unstable-ffi --name="Scroll" ./src/scroll.ts ./src/common/mod.ts ./src/deno/mod.ts ./src/bun/mod.ts
2023-11-02 13:06:48 -04:00
# Reformat the code
fmt:
deno fmt
2023-11-03 11:59:58 -04:00
# Run tests with all the runtimes
test: deno-test bun-test
# Run all code-quality related tasks
quality: check test
2023-11-03 11:59:58 -04:00
# Clean up any generated files
clean:
rm -rf .deno-cover
rm -rf coverage
2023-11-03 11:59:58 -04:00
rm -rf docs
rm -f scroll.log
rm -f scroll.err
2023-11-29 16:09:58 -05:00
rm -f tsconfig.tsbuildinfo
2023-11-03 11:59:58 -04:00
##########################################################################################
2023-11-03 11:59:58 -04:00
# Bun-specific commands
##########################################################################################
2023-11-03 11:59:58 -04:00
# Check code with actual Typescript compiler
bun-check:
bunx tsc
2023-11-03 11:59:58 -04:00
# Test with bun
bun-test:
bun test --coverage
2023-10-31 14:47:59 -04:00
# Run with bun
bun-run file="":
bun run ./src/scroll.ts {{file}}
2023-10-31 14:47:59 -04:00
##########################################################################################
2023-11-03 11:59:58 -04:00
# Deno-specific commands
##########################################################################################
2023-11-03 11:59:58 -04:00
# Lint code and check types
deno-check:
deno lint
deno check --unstable-ffi --all -c deno.jsonc ./src/deno/*.ts ./src/common/*.ts
2023-11-03 11:59:58 -04:00
# Test with deno
deno-test:
deno test --allow-all --unstable-ffi
2023-11-03 11:59:58 -04:00
# Create test coverage report with deno
deno-coverage:
./coverage.sh
2023-11-03 11:59:58 -04:00
# Run with deno
deno-run file="":
deno run --allow-all --allow-ffi --deny-hrtime --unstable-ffi ./src/scroll.ts {{file}}