typescript: add build script to post-process

pull/3627/head
Rob Pilling 2024-10-30 20:32:22 +00:00
parent 8c0380f48e
commit 3e67088354
2 changed files with 22 additions and 1 deletions

View File

@ -74,4 +74,4 @@
}
]
};
}); // FIXME: semi-colon added automatically when Typescript generates Javascript file?
})

21
typescript/build.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
set -e
usage(){
echo >&2 "Usage: $0"
exit 2
}
if test $# -ne 0
then usage
fi
cd "$(dirname "$0")"
npm run build
find ../apps -iname '*.ts' |
sed 's/\.ts$/.js/' |
grep -E 'clkinfo|setting' |
xargs perl -i -pe 's/;$// if eof'