diff --git a/package.json b/package.json index 53af34e91..eb9907179 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ }, "scripts": { "ui-assets": "copy-aragon-ui-assets -n aragon-ui ./build", - "start": "npm run ui-assets && parcel serve src/index.html --port 3000 --out-dir ./build --no-cache", + "start": "scripts/start.sh", "start:local": "scripts/launch-local.sh", "start:mainnet": "REACT_APP_ETH_NETWORK_TYPE=mainnet npm start", "start:rinkeby": "npm start", diff --git a/scripts/start.sh b/scripts/start.sh new file mode 100755 index 000000000..1f5f2796b --- /dev/null +++ b/scripts/start.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +if [[ ${ARAGON_CLIENT_PORT} ]]; +then + npm run ui-assets && parcel serve src/index.html --port $ARAGON_CLIENT_PORT --out-dir ./build --no-cache; +else + npm run ui-assets && parcel serve src/index.html --port 3000 --out-dir ./build --no-cache; +fi;