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
|
2024-07-10 16:32:28 -04:00
|
|
|
coverage: deno-coverage bun-coverage
|
2023-11-20 11:12:22 -05:00
|
|
|
|
2024-07-24 14:58:42 -04:00
|
|
|
# Generate test coverage and open report in default browser
|
|
|
|
open-coverage: coverage
|
|
|
|
open coverage/index.html
|
|
|
|
|
2023-11-02 13:06:48 -04:00
|
|
|
# Typescript checking
|
2024-07-10 16:32:28 -04:00
|
|
|
check: deno-check bun-check
|
2023-10-27 16:02:54 -04:00
|
|
|
|
2024-07-10 16:32:28 -04:00
|
|
|
# Generate source docs
|
2023-11-10 18:22:09 -05:00
|
|
|
docs:
|
2024-07-10 16:32:28 -04:00
|
|
|
deno doc --html --name="Scroll" ./src/scroll.ts ./src/common/*.ts ./src/deno/mod.ts ./src/bun/mod.ts ./src/tsx/mod.ts
|
2023-11-10 18:22:09 -05:00
|
|
|
|
2024-07-24 14:58:42 -04:00
|
|
|
# Generate source docs and open in default browser
|
|
|
|
open-docs: docs
|
|
|
|
open docs/all_symbols.html
|
|
|
|
|
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:
|
2024-07-10 16:32:28 -04:00
|
|
|
bun run bun-check
|
2023-11-08 15:53:14 -05:00
|
|
|
|
2023-11-03 11:59:58 -04:00
|
|
|
# Test with bun
|
|
|
|
bun-test:
|
2024-07-10 16:32:28 -04:00
|
|
|
bun run bun-test
|
|
|
|
|
|
|
|
# CLI test coverage report
|
|
|
|
bun-coverage:
|
|
|
|
bun run bun-coverage
|
2023-11-03 11:59:58 -04:00
|
|
|
|
2023-10-31 14:47:59 -04:00
|
|
|
# Run with bun
|
2023-11-14 15:53:45 -05:00
|
|
|
bun-run file="":
|
2024-07-10 16:32:28 -04:00
|
|
|
bun run bun-run {{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-07-10 16:32:28 -04:00
|
|
|
deno task deno-test
|
2023-11-03 11:59:58 -04:00
|
|
|
|
|
|
|
# Create test coverage report with deno
|
|
|
|
deno-coverage:
|
2024-07-10 16:32:28 -04:00
|
|
|
deno task deno-coverage
|
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}}
|
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="":
|
2024-07-10 16:32:28 -04:00
|
|
|
npm run tsx-run {{file}}
|
|
|
|
|
2024-07-05 15:51:30 -04:00
|
|
|
|