From 2e4c84eea747d33d8c578dcd25976d2616dfdfd6 Mon Sep 17 00:00:00 2001 From: Chad Ostrowski <221614+chadoh@users.noreply.github.com> Date: Thu, 20 Jul 2023 14:40:51 -0400 Subject: [PATCH 1/3] build: directly generate js libs to node_modules Roll back https://github.com/stellar/soroban-example-dapp/pull/122, but keep `crowdfund-contract` and `abundance-token` in `optionalDependencies`. As I worked with the old version in earnest, iterating on a local copy of the CLI and generating new JS libs over and over, the two-step generate-to-.soroban, then install-to-node_modules wasn't working very well. Probably because the new library wasn't being added until the `postinstall` step, and the dependencies are optional. Generating directly to `node_modules` feels dirty, but it works consistently. At least in this version, you can still see the dependencies listed in the `optionalDependencies` section, so they're not quite as surprising/mysterious. --- .gitattributes | 1 + components/molecules/form-pledge/index.tsx | 8 +- package-lock.json | 3935 +------------------- package.json | 8 +- 4 files changed, 205 insertions(+), 3747 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..f3c54b5f --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +package-lock.json linguist-generated=true -diff diff --git a/components/molecules/form-pledge/index.tsx b/components/molecules/form-pledge/index.tsx index 22addf5b..d38b3683 100644 --- a/components/molecules/form-pledge/index.tsx +++ b/components/molecules/form-pledge/index.tsx @@ -29,14 +29,14 @@ function MintButton({ account, symbol, onComplete, decimals }: { decimals: numbe const [isSubmitting, setSubmitting] = useState(false) const displayAmount = 100 - const amount = BigInt(displayAmount * 10**decimals) + const amount = BigInt(displayAmount * 10 ** decimals) return (