2023-10-27 16:02:54 -04:00
|
|
|
# Lists the available actions
|
|
|
|
default:
|
|
|
|
@just --list
|
|
|
|
|
2023-11-02 13:06:48 -04:00
|
|
|
# Typescript checking
|
2023-11-08 15:53:14 -05:00
|
|
|
check: deno-check bun-check
|
2023-10-27 16:02:54 -04:00
|
|
|
|
2023-11-10 18:22:09 -05:00
|
|
|
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-10 18:22:09 -05:00
|
|
|
|
2023-11-02 13:06:48 -04:00
|
|
|
# Reformat the code
|
|
|
|
fmt:
|
|
|
|
deno fmt
|
2023-10-27 16:02:54 -04:00
|
|
|
|
2023-11-03 11:59:58 -04:00
|
|
|
# Run tests with all the runtimes
|
|
|
|
test: deno-test bun-test
|
|
|
|
|
|
|
|
# Clean up any generated files
|
|
|
|
clean:
|
|
|
|
rm -rf .deno-cover
|
|
|
|
rm -rf cover
|
|
|
|
rm -rf docs
|
|
|
|
|
|
|
|
########################################################################################################################
|
|
|
|
# Bun-specific commands
|
|
|
|
########################################################################################################################
|
|
|
|
|
2023-11-08 15:53:14 -05: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
|
2023-11-14 15:53:45 -05:00
|
|
|
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-08 15:53:14 -05:00
|
|
|
# Lint code and check types
|
|
|
|
deno-check:
|
|
|
|
deno lint
|
|
|
|
deno check --unstable --all -c deno.jsonc ./src/deno/*.ts ./src/common/*.ts
|
|
|
|
|
2023-11-03 11:59:58 -04:00
|
|
|
# Test with deno
|
|
|
|
deno-test:
|
2023-11-16 16:00:03 -05:00
|
|
|
deno test --allow-all --unstable
|
2023-11-03 11:59:58 -04:00
|
|
|
|
|
|
|
# Create test coverage report with deno
|
|
|
|
deno-coverage:
|
2023-11-16 21:22:24 -05:00
|
|
|
./coverage.sh
|
2023-11-03 11:59:58 -04:00
|
|
|
|
2023-10-27 16:02:54 -04:00
|
|
|
# Run with deno
|
2023-11-14 15:53:45 -05:00
|
|
|
deno-run file="":
|
|
|
|
deno run --allow-all --allow-ffi --deny-net --deny-hrtime --unstable ./src/scroll.ts {{file}}
|