Skip to content

Commit fe16751

Browse files
committed
Update setup-ide script
Needed updates because it uses internals.
1 parent be5e0f1 commit fe16751

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

scripts/setup-ide/run.sh

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
#!/bin/bash
2-
source /usr/src/app/helpers.sh
3-
4-
# mkdir -p /app
5-
# if [ -f /data/service/package.json ]
6-
# then
7-
# # install script expects service package.json to be in /app
8-
# cp /data/service/package.json /app/package.json
9-
# fi
2+
echo "NOTE: running your service in development will auto-update node_modules and package-lock.json"
103

114
# this script runs from a clean slate, the app hasn't ran yet so /usr/src/app/app is empty
125
docker-rsync /app /usr/src/app/app
136
cd /usr/src/app
14-
./prepare-package-json.sh
15-
./npm-install-dependencies.sh
7+
if [ -f /app/package-lock.json ]
8+
then
9+
./npm-install-dependencies.sh development ci
10+
else
11+
./npm-install-dependencies.sh development install
12+
fi
13+
14+
./validate-package-json.sh
1615

1716
# copy results into the service's source folder
1817
docker-rsync /usr/src/app/app/node_modules/ /app/node_modules
19-
# TODO: this should be behind an ENV var and should be updated when running development so it's kept up-to-date. It may be that this requires us to have the node_modules locally but only saving in this case makes it feel a bit brittle
18+
2019
if [ -f /usr/src/app/app/package-lock.json ]
2120
then
2221
cp /usr/src/app/app/package-lock.json /app/package-lock.json
2322
fi
23+
24+
echo "NOTE: running your service in development will auto-update node_modules and package-lock.json"

0 commit comments

Comments
 (0)