From 6d2a0bd1c87dc6aa6383057907fd12f909332d05 Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Wed, 11 Oct 2023 18:23:53 +0100 Subject: [PATCH] chore: toolchain runs start/build for devnet or build for testnet if required by Netlify --- web/.env.local.public | 2 +- web/package.json | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/web/.env.local.public b/web/.env.local.public index 3bc703ce3..89b89dfb1 100644 --- a/web/.env.local.public +++ b/web/.env.local.public @@ -1,4 +1,4 @@ # Do not enter sensitive information here. export REACT_APP_DEPLOYMENT=devnet export REACT_APP_KLEROS_CORE_SUBGRAPH_DEVNET=http://localhost:8000/subgraphs/name/kleros/kleros-v2-core-local -export REACT_APP_DISPUTE_TEMPLATE_ARBGOERLI_SUBGRAPH_DEVNET=https://api.thegraph.com/subgraphs/name/alcercu/disputetemplateregistryarbgrli2 +export REACT_APP_DISPUTE_TEMPLATE_ARBGOERLI_SUBGRAPH_DEVNET=https://api.thegraph.com/subgraphs/name/alcercu/templateregistrydevnet diff --git a/web/package.json b/web/package.json index 0a305a775..c750ebf71 100644 --- a/web/package.json +++ b/web/package.json @@ -24,10 +24,12 @@ "packageManager": "yarn@3.3.1", "scripts": { "clear": "rm -fr ../.parcel-cache dist/bundle.js", - "start": "scripts/runEnv.sh devnet 'yarn generate && parcel'", - "start-testnet": "scripts/runEnv.sh testnet 'yarn generate && parcel'", + "start": "yarn start-devnet", "start-local": "scripts/runEnv.sh local 'yarn generate && parcel'", - "build": "node scripts/gitInfo.js && yarn generate && parcel build", + "start-devnet": "scripts/runEnv.sh devnet 'yarn generate && parcel'", + "start-testnet": "scripts/runEnv.sh testnet 'yarn generate && parcel'", + "build": "yarn build-${REACT_APP_DEPLOYMENT:-devnet}", + "build-local": "scripts/runEnv.sh local 'yarn generate && parcel build'", "build-devnet": "scripts/runEnv.sh devnet 'yarn generate && parcel build'", "build-testnet": "scripts/runEnv.sh testnet 'yarn generate && parcel build'", "check-style": "eslint 'src/**/*.{js,jsx,ts,tsx}'",