Skip to content

Commit

Permalink
correct error handling; formal build; formatting; various
Browse files Browse the repository at this point in the history
  • Loading branch information
j50n committed May 28, 2023
1 parent 25cfb05 commit 314d5fd
Show file tree
Hide file tree
Showing 29 changed files with 1,334 additions and 21,921 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Jason Smith
Copyright (c) 2021-2023 Jason Smith

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
36 changes: 36 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

set -e

HERE="$(realpath "$(dirname "$0")")"

deno install -rf --allow-read="$HERE/" --allow-write="$HERE/" --allow-net https://deno.land/x/udd/main.ts

cd "$HERE/legacy/" && (
./build.ts
)

cd "$HERE/site/" && (
cargo install mdbook
mdbook build
rm -rf ../docs/*
rsync -av ./book/ ../docs/
)

cd "$HERE" && (
# udd `find . -type f -name "*.ts"`

deno fmt `find . -type f -name "*.md"`
deno fmt `find . -type f -name "*.ts"`

# This detects the hack pattern, only on the second line of the file
# and removes the added semicolon if present. `deno fmt` breaks the
# hack shebang pattern, so we have to fix it up.
sed -i '2s|^":";\s[/][/]#;|":" //#;|' `find . -type f -name "*.ts"`

deno lint `find . -type f -name "*.ts"`
deno check `find . -type f -name "*.ts"`

deno test --reload --allow-read --allow-run=grep,sort,uniq,gunzip,ls,deno ./tests/
)

Loading

0 comments on commit 314d5fd

Please sign in to comment.