Fixed build scripts and building tools
This commit is contained in:
parent
d75e1ca492
commit
2f202a634f
5 changed files with 42 additions and 6 deletions
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
BASEDIR=$(dirname "$0")
|
BASEDIR=$(dirname "$0")
|
||||||
source "${BASEDIR}/resolve_commands.sh"
|
source "${BASEDIR}/resolve_commands.sh"
|
||||||
|
cd "$BASEDIR/../"
|
||||||
|
|
||||||
function generate_link() {
|
function generate_link() {
|
||||||
if [ ! -L $2 ] || [ "${BASH_ARGV[0]}" == "force" ]; then
|
if [ ! -L $2 ] || [ "${BASH_ARGV[0]}" == "force" ]; then
|
||||||
|
@ -16,17 +17,14 @@ function replace_tribble() {
|
||||||
#${1} => file name
|
#${1} => file name
|
||||||
echo "$(cat ${1} | sed -E 's/\/\/\/[ ]+<reference [a-zA-Z.-=_ ]+\/>.*/\n/')" > ${1}
|
echo "$(cat ${1} | sed -E 's/\/\/\/[ ]+<reference [a-zA-Z.-=_ ]+\/>.*/\n/')" > ${1}
|
||||||
}
|
}
|
||||||
BASEDIR=$(dirname "$0")
|
|
||||||
cd "$BASEDIR/../"
|
|
||||||
|
|
||||||
#Building the generator
|
#Building the generator
|
||||||
cd tools/dtsgen
|
./tools/build_dtsgen.sh
|
||||||
execute_tsc -p tsconfig.json
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Failed to build typescript declaration generator"
|
echo "Failed to build typescript declaration generator"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
cd ../../
|
|
||||||
|
|
||||||
#Easy going: Each "module" has it's exports and imports
|
#Easy going: Each "module" has it's exports and imports
|
||||||
#So lets first build the exports and ignore any errors
|
#So lets first build the exports and ignore any errors
|
||||||
|
|
|
@ -34,6 +34,14 @@ if [ $? -ne 0 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#Lets build some tools
|
||||||
|
#dtsgen should be already build by build_declarations.sh
|
||||||
|
./tools/build_trsgen.sh
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Failed to build typescript translation generator"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
#Now lets build the declarations
|
#Now lets build the declarations
|
||||||
echo "Building declarations"
|
echo "Building declarations"
|
||||||
./scripts/build_declarations.sh
|
./scripts/build_declarations.sh
|
||||||
|
|
13
tools/build_dtsgen.sh
Executable file
13
tools/build_dtsgen.sh
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
BASEDIR=$(dirname "$0")
|
||||||
|
source "${BASEDIR}/../scripts/resolve_commands.sh"
|
||||||
|
cd "$BASEDIR/dtsgen"
|
||||||
|
|
||||||
|
execute_tsc -p tsconfig.json
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Failed to build typescript declaration generator"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
13
tools/build_trgen.sh
Executable file
13
tools/build_trgen.sh
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
BASEDIR=$(dirname "$0")
|
||||||
|
source "${BASEDIR}/../scripts/resolve_commands.sh"
|
||||||
|
cd "$BASEDIR/trgen"
|
||||||
|
|
||||||
|
execute_tsc -p tsconfig.json
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Failed to build typescript translation generator"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
|
@ -10,6 +10,10 @@
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"generator.ts",
|
"generator.ts",
|
||||||
"index.ts"
|
"index.ts",
|
||||||
|
"compiler.ts",
|
||||||
|
"jsrender_generator.ts",
|
||||||
|
"ts_generator.ts",
|
||||||
|
"ttsc_transformer.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue