Skip to content

Commit 5ab3947

Browse files
authored
fix(package.json): Add dotenv support to build and deployment scripts (#439)
1 parent 518f867 commit 5ab3947

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/subgraph/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
"scripts": {
66
"format": "prettier --write \"(src|tests)/**/*.{ts,json}\"",
77
"check-format": "prettier --check \"(src|tests)/**/*.ts|tests/**/*.ts\"",
8-
"build": "graph codegen && graph build --network ${NETWORK_NAME:-bellecour}",
8+
"build": "dotenv -e .env -- graph codegen && graph build --network ${NETWORK_NAME:-bellecour}",
99
"deploy": "graph deploy --node https://api.thegraph.com/deploy/ DataProtector",
10-
"create-local": "graph create --node ${GRAPHNODE_URL:-http://localhost:8020} ${NETWORK_NAME:-bellecour}/DataProtector-v2",
11-
"remove-local": "graph remove --node ${GRAPHNODE_URL:-http://localhost:8020} ${NETWORK_NAME:-bellecour}/DataProtector-v2",
12-
"deploy-local": "graph deploy --node ${GRAPHNODE_URL:-http://localhost:8020} --ipfs ${IPFS_URL:-http://localhost:5001} ${NETWORK_NAME:-bellecour}/DataProtector-v2 --version-label ${VERSION_LABEL:-dev}",
10+
"create-local": "dotenv -e .env -- graph create --node ${GRAPHNODE_URL:-http://localhost:8020} ${NETWORK_NAME:-bellecour}/DataProtector-v2",
11+
"remove-local": "dotenv -e .env -- graph remove --node ${GRAPHNODE_URL:-http://localhost:8020} ${NETWORK_NAME:-bellecour}/DataProtector-v2",
12+
"deploy-local": "dotenv -e .env -- graph deploy --node ${GRAPHNODE_URL:-http://localhost:8020} --ipfs ${IPFS_URL:-http://localhost:5001} ${NETWORK_NAME:-bellecour}/DataProtector-v2 --version-label ${VERSION_LABEL:-dev}",
1313
"clean": "rm -rf generated && rm -rf build",
1414
"all": "npm run clean && npm run codegen && npm run build && npm run create-local && npm run deploy-local",
1515
"refresh-abis": "node tools/refreshAbis.mjs",

0 commit comments

Comments
 (0)