scroll/justfile

101 lines
2.1 KiB
Makefile
Raw Normal View History

# Lists the available actions
default:
@just --list
2023-11-20 11:12:22 -05:00
# Test coverage
coverage: deno-coverage bun-coverage
2023-11-20 11:12:22 -05: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
check: deno-check bun-check
# Generate source docs
docs:
2024-07-25 11:47:44 -04:00
deno doc --html --name="Scroll" ./src/common/*.ts ./src/common/**/*.ts
# 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-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
# 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
rm -rf coverage
2023-11-03 11:59:58 -04:00
rm -rf docs
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
##########################################################################################
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:
bun run bun-check
2023-11-03 11:59:58 -04:00
# Test with bun
bun-test:
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
bun-run file="":
bun run bun-run {{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 task deno-lint
deno task deno-check
2023-11-03 11:59:58 -04:00
# Test with deno
deno-test:
deno task deno-test
2023-11-03 11:59:58 -04:00
# Create test coverage report with deno
deno-coverage:
deno task deno-coverage
2023-11-03 11:59:58 -04:00
# Run with deno
deno-run file="":
deno task deno-run {{file}}
2024-07-05 15:51:30 -04:00
##########################################################################################
# tsx(Node JS)-specific commands
##########################################################################################
# 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:
npm run tsx-test
2024-07-05 15:51:30 -04:00
# Run with tsx (NodeJS)
tsx-run file="":
npm run tsx-run {{file}}
2024-07-05 15:51:30 -04:00