-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathprepare.sh
executable file
·44 lines (32 loc) · 1.02 KB
/
prepare.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh
set -e
git submodule update --recursive --init
# Official Microsoft/TypeScript clone
cd ./TypeScript
git clean -xfd
git fetch origin
git reset --hard origin/master
# Fix jakefile to expose the internal APIs to service
< Jakefile.js > Jakefile.new.js sed -E "s/\*stripInternal\*\/ true/\*stripInternal\*\/ false/"
mv Jakefile.new.js Jakefile.js
# Install jake and everything else
npm install
# Build once to get a new LKG
./node_modules/.bin/jake release tsc --trace
cp ./built/local/* ./bin/
# Copy the source TypeScript compiler and services, but not the tsconfig.json files
cp -r ./src/compiler/* ../src/compiler
cp -r ./src/services/* ../src/services
rm ../src/services/tsconfig.json ../src/compiler/tsconfig.json
# Do pre build modifications
node ../extensions/preBuild.js
# Now build using the LKG
./bin/tsc -p ../src
./bin/tsc -p ../extensions
# Also copy the lib.* stuff from LKG
cp ./bin/lib* ../bin
# add custom extension
node ../extensions/addExtensions.js
# Reset sub typescript
git reset --hard origin/master
cd ..