mirror of
https://github.com/mjl-/mox.git
synced 2025-07-13 00:54:38 +03:00
change javascript into typescript for webaccount and webadmin interface
all ui frontend code is now in typescript. we no longer need jshint, and we build the frontend code during "make build". this also changes tlsrpt types for a Report, not encoding field names with dashes, but to keep them valid identifiers in javascript. this makes it more conveniently to work with in the frontend, and works around a sherpats limitation.
This commit is contained in:
5
tsc.sh
5
tsc.sh
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# - todo: get tsc to not emit semicolons except for the handful cases where it is needed.
|
||||
# - todo: get tsc to directly print unix line numbers without --pretty (which seems unaware of termcap).
|
||||
@ -6,6 +7,6 @@
|
||||
|
||||
out=$1
|
||||
shift
|
||||
./node_modules/.bin/tsc --pretty false --newLine lf --strict --allowUnreachableCode false --allowUnusedLabels false --noFallthroughCasesInSwitch true --noImplicitReturns true --noUnusedLocals true --noImplicitThis true --noUnusedParameters true --target es2021 --module none --outFile $out.spaces "$@" | sed -E 's/^([^\(]+)\(([0-9]+),([0-9]+)\):/\1:\2:\3: /'
|
||||
./node_modules/.bin/tsc --noEmitOnError true --pretty false --newLine lf --strict --allowUnreachableCode false --allowUnusedLabels false --noFallthroughCasesInSwitch true --noImplicitReturns true --noUnusedLocals true --noImplicitThis true --noUnusedParameters true --target es2022 --module none --outFile $out.spaces "$@" | sed -E 's/^([^\(]+)\(([0-9]+),([0-9]+)\):/\1:\2:\3: /'
|
||||
unexpand -t4 <$out.spaces >$out
|
||||
rm $out.spaces
|
||||
|
Reference in New Issue
Block a user