Put the important scripts package.json so they can be run without Just
Some checks failed
timw4mail/scroll/pipeline/head There was a failure building this commit

This commit is contained in:
Timothy Warren 2024-07-10 16:32:28 -04:00
parent 4be7be09a7
commit d7bf8801c9
2 changed files with 22 additions and 14 deletions

View File

@ -3,13 +3,14 @@ default:
@just --list @just --list
# Test coverage # Test coverage
coverage: bun-test deno-coverage coverage: deno-coverage bun-coverage
# Typescript checking # Typescript checking
check: deno-check bun-check tsx-check check: deno-check bun-check
# Generate source docs
docs: docs:
deno doc --html --unstable-ffi --name="Scroll" ./src/scroll.ts ./src/common/*.ts ./src/deno/mod.ts ./src/bun/mod.ts deno doc --html --name="Scroll" ./src/scroll.ts ./src/common/*.ts ./src/deno/mod.ts ./src/bun/mod.ts ./src/tsx/mod.ts
# Reformat the code # Reformat the code
fmt: fmt:
@ -37,15 +38,19 @@ clean:
# Check code with actual Typescript compiler # Check code with actual Typescript compiler
bun-check: bun-check:
bunx tsc bun run bun-check
# Test with bun # Test with bun
bun-test: bun-test:
bun test --coverage bun run bun-test
# CLI test coverage report
bun-coverage:
bun run bun-coverage
# Run with bun # Run with bun
bun-run file="": bun-run file="":
bun run ./src/scroll.ts {{file}} bun run bun-run {{file}}
########################################################################################## ##########################################################################################
# Deno-specific commands # Deno-specific commands
@ -58,16 +63,15 @@ deno-check:
# Test with deno # Test with deno
deno-test: deno-test:
deno test --allow-all --unstable-ffi deno task deno-test
# Create test coverage report with deno # Create test coverage report with deno
deno-coverage: deno-coverage:
./coverage.sh deno task deno-coverage
# Run with deno # Run with deno
deno-run file="": deno-run file="":
deno task deno-run {{file}} deno task deno-run {{file}}
#deno run --allow-all --allow-ffi --deny-hrtime --unstable-ffi ./src/scroll.ts {{file}}
########################################################################################## ##########################################################################################
# tsx(Node JS)-specific commands # tsx(Node JS)-specific commands
@ -83,5 +87,6 @@ tsx-test:
# Run with tsx (NodeJS) # Run with tsx (NodeJS)
tsx-run file="": tsx-run file="":
npx tsx ./src/scroll.ts {{file}} npm run tsx-run {{file}}

View File

@ -1,18 +1,21 @@
{ {
"dependencies": {}, "dependencies": {},
"devDependencies": { "devDependencies": {
"bun-types": "^1.0.11" "bun-types": "^1.0.11",
"typescript": "^5.5"
}, },
"scripts": { "scripts": {
"bun-check": "bunx tsc", "bun-check": "bunx tsc",
"bun-coverage": "bun test --coverage", "bun-coverage": "bun test --coverage",
"bun-run": "bun run ./src/scroll.ts",
"bun-test": "bun test", "bun-test": "bun test",
"deno-lint": "deno lint", "deno-lint": "deno lint",
"deno-check": "deno check --unstable-ffi --all -c deno.jsonc ./src/deno/*.ts ./src/common/*.ts ./src/tsx/*.ts", "deno-check": "deno check --all -c deno.jsonc ./src/deno/*.ts ./src/common/*.ts ./src/tsx/*.ts",
"deno-coverage": "./coverage.sh", "deno-coverage": "./coverage.sh",
"deno-run": "deno run --allow-all --allow-ffi --deny-hrtime --unstable-ffi ./src/scroll.ts", "deno-run": "deno run --allow-all --deny-hrtime ./src/scroll.ts",
"deno-test": "deno test --allow-all --unstable-ffi", "deno-test": "deno test --allow-all",
"tsx-check": "npx tsc", "tsx-check": "npx tsc",
"tsx-run": "npx tsx ./src/scroll.ts",
"tsx-test": "npx tsx --test './src/common/all_test.ts'" "tsx-test": "npx tsx --test './src/common/all_test.ts'"
}, },
"type": "module" "type": "module"