-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
33 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,39 @@ | ||
#!/bin/bash | ||
|
||
# Exit on any error | ||
set -e | ||
|
||
npm ci | ||
npm link | ||
npm run build | ||
# Functions for better readability | ||
install_dependencies() { | ||
echo "Installing main dependencies..." | ||
npm ci | ||
} | ||
|
||
link_package() { | ||
echo "Linking package..." | ||
if ! npm link &> /dev/null; then | ||
echo "Failed to link package. Exiting." | ||
exit 1 | ||
fi | ||
} | ||
|
||
build_package() { | ||
echo "Building main package..." | ||
npm run build | ||
} | ||
|
||
setup_demo() { | ||
echo "Setting up demo environment..." | ||
cd demo | ||
npm install | ||
npm link dynamic-marquee # Link the main package in the demo environment | ||
npm run build | ||
} | ||
|
||
cd demo | ||
npm install | ||
npm link dynamic-marquee | ||
npm run build | ||
# Run the functions in sequence | ||
install_dependencies | ||
link_package | ||
build_package | ||
setup_demo | ||
|
||
echo "Done!" |