Files
wehub-resource-sync f0dfbfc3d7
RequirementsTest / build (windows-latest, 3.9) (push) Has been cancelled
RequirementsTest / build (macos-latest, 3.9) (push) Has been cancelled
RequirementsTest / build (ubuntu-latest, 3.9) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Pylint / build (3.9) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:18:32 +08:00

30 lines
619 B
Bash

#!/bin/bash
# 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
../node_modules/.bin/tsc blockly.d.ts
if [ $? -eq 0 ]
then
echo -e "${BOLD_GREEN}TypeScript typings compiled successfully.${ANSI_RESET}"
exit 0
else
echo -e "${BOLD_RED}Failed to compile TypeScript typings.${ANSI_RESET}" >&2
exit 1
fi