Have npm run typings use built directory; fix typescript tests

* Modify scripts/gulpfiles/typings.js to write typings to BUILD_DIR.
* Modify tests/scripts/compile_typings.sh to check compilability of
  resulting output from BUILD_DIR.
* Rename checkin script to checkin:built, add a checkin:typings script
  to do the same for .d.ts files, and a new checkin script to do both.
* Have recompile run checkin:typings.
This commit is contained in:
Christopher Allen
2021-06-29 16:25:36 +01:00
parent 1aa35ef438
commit 37ecce8d80
5 changed files with 28 additions and 12 deletions

View File

@@ -1,21 +1,21 @@
#!/bin/bash
# Location that npm run typings will write .d.ts files to.
readonly BUILD_DIR='built'
# ANSI colors
BOLD_GREEN='\033[1;32m'
BOLD_RED='\033[1;31m'
ANSI_RESET='\033[0m'
# Download TypeScript to obtain the compiler.
echo "Downloading TypeScript"
npm install typescript
# Generate Blockly typings.
echo "Generating Blockly typings"
npm run typings
# Use the TypeScript compiler to compile the generated typings.
echo "Compiling typings"
cd typings
cd "${BUILD_DIR}"
../node_modules/.bin/tsc blockly.d.ts