mirror of
https://github.com/google/blockly.git
synced 2026-01-09 10:00:09 +01:00
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:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user