-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reorganized repository to account for client-side functionality
we're including reusable library functionality for client apps in this repo (limited to crypto for now), but client-side environments require slightly different settings for testing and type checking (at least if we wanna remain strict) - so unfortunately, we need non-trivial scripts to make that work in the process, simplified type checking as Deno now supports globbing throughout (see denoland/deno#24668)
- Loading branch information
Showing
7 changed files
with
74 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eu | ||
|
||
root_dir=`dirname "$0"` | ||
root_dir=`realpath "$root_dir/.."` | ||
|
||
server_options=(--allow-env) | ||
|
||
# special-casing watch mode | ||
watch="false" | ||
options=(--deny-net=example.org) # workaround: empty array is considered unbound variable | ||
for arg in "$@"; do | ||
case "$arg" in | ||
-w | --watch) | ||
watch="true" | ||
;; | ||
*) | ||
options+=("$arg") | ||
;; | ||
esac | ||
shift | ||
done | ||
|
||
cd "$root_dir" | ||
if [ "$watch" = "true" ]; then | ||
# XXX: crude; combining all options to avoid backgrounding subprocesses | ||
deno test "${options[@]}" --watch "${server_options[@]}" | ||
else | ||
deno test "${options[@]}" "${server_options[@]}" ./src/server | ||
deno test "${options[@]}" ./src/client | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"lib": ["esnext", "dom"] | ||
} | ||
} |