Fixed declarations
This commit is contained in:
parent
94820eb6f4
commit
5733a250b0
2
.gitignore
vendored
2
.gitignore
vendored
@ -15,6 +15,6 @@ updater/postzip/TeaClient-linux.tar.gz
|
|||||||
.deploy_secret
|
.deploy_secret
|
||||||
|
|
||||||
**/*.d.ts
|
**/*.d.ts
|
||||||
!modules/imports/copy_*
|
!modules/renderer/imports/copy_*.d.ts
|
||||||
|
|
||||||
package-lock.json
|
package-lock.json
|
||||||
|
@ -5,8 +5,8 @@ cd "${BASEDIR}"
|
|||||||
|
|
||||||
file_paths=(
|
file_paths=(
|
||||||
"$(pwd ~)/../../Web-Client/shared/declarations"
|
"$(pwd ~)/../../Web-Client/shared/declarations"
|
||||||
"$(pwd ~)/TeaSpeak/Web-Client/shared/declarations"
|
# "$(pwd ~)/TeaSpeak/Web-Client/shared/declarations"
|
||||||
"$(pwd ~)/../../TeaSpeak/Web-Client/shared/declarations"
|
# "$(pwd ~)/../../TeaSpeak/Web-Client/shared/declarations"
|
||||||
"app/dummy-declarations"
|
"app/dummy-declarations"
|
||||||
#TODO Windows path
|
#TODO Windows path
|
||||||
)
|
)
|
||||||
@ -50,12 +50,36 @@ path_found=0
|
|||||||
echo "Linking \"${path_target}/${dst_file}\" to \"${path}/${src_file}\""
|
echo "Linking \"${path_target}/${dst_file}\" to \"${path}/${src_file}\""
|
||||||
|
|
||||||
cp "${path}/${src_file}" "${path_target}/copy_${dst_file}"
|
cp "${path}/${src_file}" "${path_target}/copy_${dst_file}"
|
||||||
echo "Create copy \"${path_target}/${dst_file}\" to \"${path}/${src_file}\""
|
echo "Create copy \"${path}/${src_file}\" to \"${path_target}/copy_${dst_file}\""
|
||||||
done
|
done
|
||||||
break
|
break
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [[ ${path_found} -eq 0 ]]; then
|
||||||
|
echo "Could not import a link to shared imports. Trying copied import."
|
||||||
|
|
||||||
|
for file in "${files[@]}"
|
||||||
|
do
|
||||||
|
file_mapping=$(echo ${file_mapping} | tr ";" "\n")
|
||||||
|
dst_file=${file_mapping[1]}
|
||||||
|
|
||||||
|
if [[ -e "${path_target}/${dst_file}" ]] || [[ -L "${path_target}/${dst_file}" ]]; then
|
||||||
|
echo "Hmm target file already exists even thou it hasn't been found yet... Deleting it!"
|
||||||
|
rm "${path_target}/${dst_file}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -e "${path_target}/copy_${dst_file}" ]]; then
|
||||||
|
echo "Missing copy of file ${dst_file} because we cant find any valid link!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
ln -rs "${path_target}/copy_${dst_file}" "${path_target}/${dst_file}"
|
||||||
|
echo "Linking \"${path_target}/${dst_file}\" to \"${path_target}/copy_${dst_file}\""
|
||||||
|
done
|
||||||
|
path_found=1
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ path_found -eq 0 ]]; then
|
if [[ path_found -eq 0 ]]; then
|
||||||
echo "Failed to find UI imports"
|
echo "Failed to find UI imports"
|
||||||
echo "Add your path to 'file_paths' and build the declarations first"
|
echo "Add your path to 'file_paths' and build the declarations first"
|
||||||
|
@ -16,6 +16,9 @@ function install_npm() {
|
|||||||
|
|
||||||
function compile_scripts() {
|
function compile_scripts() {
|
||||||
begin_task "${project_name}_tsc_sass" "Compiling TypeScript & SASS"
|
begin_task "${project_name}_tsc_sass" "Compiling TypeScript & SASS"
|
||||||
|
./build_declarations.sh
|
||||||
|
check_err_exit ${project_name} "Failed to build shared ui import declarations!"
|
||||||
|
|
||||||
npm run compile-tsc -- -p modules/tsconfig_main.json
|
npm run compile-tsc -- -p modules/tsconfig_main.json
|
||||||
npm run compile-tsc -- -p modules/tsconfig_renderer.json
|
npm run compile-tsc -- -p modules/tsconfig_renderer.json
|
||||||
npm run compile-tsc -- -p installer/tsconfig_linux.json
|
npm run compile-tsc -- -p installer/tsconfig_linux.json
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
"./renderer",
|
"./renderer",
|
||||||
"./crash_handler",
|
"./crash_handler",
|
||||||
"./shared",
|
"./shared",
|
||||||
|
"./shared/imports/*.d.ts",
|
||||||
|
|
||||||
"../native/*/exports/"
|
"../native/*/exports/"
|
||||||
],
|
],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user