From cca4844475cabe6f561731ae02ff45e4fb2fb210 Mon Sep 17 00:00:00 2001 From: Tyler Krys Date: Mon, 19 Aug 2024 15:54:13 -0700 Subject: [PATCH] Script to prepare npm package copies design tokens root package.json version --- packages/design-tokens/run-prepare-npm-package.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/design-tokens/run-prepare-npm-package.sh b/packages/design-tokens/run-prepare-npm-package.sh index 678a974a..b4fe675e 100755 --- a/packages/design-tokens/run-prepare-npm-package.sh +++ b/packages/design-tokens/run-prepare-npm-package.sh @@ -5,3 +5,7 @@ rm -rf dist/js* # Copy the contents of build into dist cp -R build/* dist + +# Update the version in dist/package.json to match the root package.json version +ROOT_VERSION=$(jq -r '.version' package.json) +jq --arg version "$ROOT_VERSION" '.version = $version' dist/package.json > tmp.$$.json && mv tmp.$$.json dist/package.json