From 380469e43b052d9b569b260a38a0cc5b1d2debd7 Mon Sep 17 00:00:00 2001 From: Pablo Carranza Velez Date: Fri, 19 Jan 2024 13:39:22 -0300 Subject: [PATCH] fix: correctly pass ts file list to tsc in prepack --- packages/contracts/scripts/prepack | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/packages/contracts/scripts/prepack b/packages/contracts/scripts/prepack index 60b4fcecd..66af2b7fb 100755 --- a/packages/contracts/scripts/prepack +++ b/packages/contracts/scripts/prepack @@ -9,15 +9,11 @@ yarn clean yarn build # Refresh distribution folder -rm -rf dist && mkdir -p dist/types/_src +rm -rf dist && mkdir -p ${TYPECHAIN_DIR} cp -R build/abis/ dist/abis -cp -R build/types/ dist/types/_src - -### Build Typechain bindings +cp -R build/types/ ${TYPECHAIN_DIR} # Build and create TS declarations -tsc -d ${TYPECHAIN_DIR}/_src/*.ts --outdir ${TYPECHAIN_DIR} --esModuleInterop -# Copy back sources -cp ${TYPECHAIN_DIR}/_src/*.ts ${TYPECHAIN_DIR} -# Delete temporary src dir -rm -rf ${TYPECHAIN_DIR}/_src +pushd ${TYPECHAIN_DIR} +ls *.ts **/*.ts | xargs tsc --esModuleInterop +popd