Skip to content

Commit d29cd46

Browse files
committed
chore: fix examples scripts
1 parent 01d3064 commit d29cd46

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

scripts/build-examples.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22

33
examplesRoot="$(cd -P "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"/examples
44

5-
for d in */; do
5+
for d in $examplesRoot/*/; do
6+
# Skip the template directory
7+
if [ "$(basename $d)" = "_template" ]; then
8+
continue
9+
fi
10+
611
echo ">>> building example '$(basename $d)'"
7-
cd $examplesRoot/$d
12+
cd $d
813
npm run build
914

1015
if [ ! $? ] ; then

scripts/install-examples.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22

33
examplesRoot="$(cd -P "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"/examples
44

5-
for d in */; do
5+
for d in $examplesRoot/*/; do
6+
# Skip the template directory
7+
if [ "$(basename $d)" = "_template" ]; then
8+
continue
9+
fi
10+
611
echo ">>> installing example '$(basename $d)'"
7-
cd $examplesRoot/$d
12+
cd $d
813
npm i --silent
914
done
1015

scripts/update-examples.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
rootDir="$(cd -P "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
55

66
for d in `find ${rootDir}/examples -type d -depth 1` ; do
7+
# Skip the template directory
8+
if [ "$(basename $d)" = "_template" ]; then
9+
continue
10+
fi
11+
712
echo ">>> updating example '$(basename $d)'"
813
(
914
cd $d

0 commit comments

Comments
 (0)