-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1107 from ManishMadan2882/main
React-widget: Adding "large" option for widget size
- Loading branch information
Showing
4 changed files
with
87 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
## chmod +x publish.sh - to upgrade ownership | ||
set -e | ||
cat package.json >> package_copy.json | ||
publish_package() { | ||
PACKAGE_NAME=$1 | ||
BUILD_COMMAND=$2 | ||
# Update package name in package.json | ||
jq --arg name "$PACKAGE_NAME" '.name=$name' package.json > temp.json && mv temp.json package.json | ||
|
||
# Remove 'target' key if the package name is 'docsgpt-react' | ||
if [ "$PACKAGE_NAME" = "docsgpt-react" ]; then | ||
jq 'del(.targets)' package.json > temp.json && mv temp.json package.json | ||
fi | ||
|
||
if [ -d "dist" ]; then | ||
echo "Deleting existing dist directory..." | ||
rm -rf dist | ||
fi | ||
|
||
npm version patch | ||
|
||
npm run "$BUILD_COMMAND" | ||
|
||
# Publish to npm | ||
npm publish | ||
echo "Published ${PACKAGE_NAME}" | ||
} | ||
|
||
# Publish docsgpt package | ||
publish_package "docsgpt" "build" | ||
|
||
# Publish docsgpt-react package | ||
publish_package "docsgpt-react" "build:react" | ||
|
||
# Clean up | ||
mv package_copy.json package.json | ||
rm -rf package_copy.json | ||
echo "---Process completed---" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters