Skip to content

Commit

Permalink
fix: correctly pass ts file list to tsc in prepack
Browse files Browse the repository at this point in the history
  • Loading branch information
pcarranzav committed Jan 19, 2024
1 parent 2ef4613 commit 380469e
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions packages/contracts/scripts/prepack
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 380469e

Please sign in to comment.