2023-10-27 16:02:54 -04:00
|
|
|
# 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
|
2024-07-10 16:12:39 -04:00
|
|
|
check: deno-check bun-check tsx-check
|
2023-10-27 16:02:54 -04:00
|
|
|
|
2023-11-10 18:22:09 -05:00
|
|
|
docs:
|
2024-07-05 15:51:30 -04:00
|
|
|
deno doc --html --unstable-ffi --name="Scroll" ./src/scroll.ts ./src/common/*.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
|
2024-07-09 16:12:28 -04:00
|
|
|
test: deno-test tsx-test bun-test
|
2023-11-03 11:59:58 -04:00
|
|
|
|
2024-02-29 13:51:45 -05:00
|
|
|
# Run all code-quality related tasks
|
|
|
|
quality: check test
|
|
|
|
|
2023-11-03 11:59:58 -04:00
|
|
|
# Clean up any generated files
|
|
|
|
clean:
|
2024-07-05 15:51:30 -04:00
|
|
|
rm -f test.file
|
2023-11-03 11:59:58 -04:00
|
|
|
rm -rf .deno-cover
|
2023-11-22 17:20:16 -05:00
|
|
|
rm -rf coverage
|
2023-11-03 11:59:58 -04:00
|
|
|
rm -rf docs
|
2024-07-10 16:12:39 -04:00
|
|
|
rm -f scroll*.log
|
|
|
|
rm -f test.file
|
2023-11-29 16:09:58 -05:00
|
|
|
rm -f tsconfig.tsbuildinfo
|
2023-11-03 11:59:58 -04:00
|
|
|
|
2024-06-21 14:14:10 -04:00
|
|
|
##########################################################################################
|
2023-11-03 11:59:58 -04:00
|
|
|
# Bun-specific commands
|
2024-06-21 14:14:10 -04:00
|
|
|
##########################################################################################
|
2023-11-03 11:59:58 -04:00
|
|
|
|
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
|
|
|
|
2024-06-21 14:14:10 -04:00
|
|
|
##########################################################################################
|
2023-11-03 11:59:58 -04:00
|
|
|
# Deno-specific commands
|
2024-06-21 14:14:10 -04:00
|
|
|
##########################################################################################
|
2023-11-03 11:59:58 -04:00
|
|
|
|
2023-11-08 15:53:14 -05:00
|
|
|
# Lint code and check types
|
|
|
|
deno-check:
|
2024-07-10 16:12:39 -04:00
|
|
|
deno task deno-lint
|
|
|
|
deno task deno-check
|
2023-11-08 15:53:14 -05:00
|
|
|
|
2023-11-03 11:59:58 -04:00
|
|
|
# Test with deno
|
|
|
|
deno-test:
|
2024-02-22 14:57:12 -05:00
|
|
|
deno test --allow-all --unstable-ffi
|
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="":
|
2024-07-10 16:12:39 -04:00
|
|
|
deno task deno-run {{file}}
|
|
|
|
#deno run --allow-all --allow-ffi --deny-hrtime --unstable-ffi ./src/scroll.ts {{file}}
|
2024-07-05 15:51:30 -04:00
|
|
|
|
|
|
|
##########################################################################################
|
|
|
|
# tsx(Node JS)-specific commands
|
|
|
|
##########################################################################################
|
|
|
|
|
2024-07-10 16:12:39 -04:00
|
|
|
# Check code with actual Typescript compiler
|
|
|
|
tsx-check:
|
|
|
|
npm run tsx-check
|
|
|
|
|
2024-07-05 15:51:30 -04:00
|
|
|
# Test with tsx (NodeJS)
|
|
|
|
tsx-test:
|
2024-07-10 16:12:39 -04:00
|
|
|
npm run tsx-test
|
2024-07-05 15:51:30 -04:00
|
|
|
|
|
|
|
# Run with tsx (NodeJS)
|
|
|
|
tsx-run file="":
|
|
|
|
npx tsx ./src/scroll.ts {{file}}
|
|
|
|
|