Skip to content

Commit b287ce3

Browse files
committed
fix: added code generation for frontend toolchain
1 parent 9cbf21c commit b287ce3

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,15 @@ Queries (HTTP): http://localhost:8000/subgraphs/name/kleros/kleros-v2-core-l
153153
#### Shell 4 - Frontend Pointing to the Local Subgraph
154154

155155
```bash
156-
$ yarn workspace @kleros/kleros-v2-web start-local
156+
yarn workspace @kleros/kleros-v2-web generate
157+
✔ Parse Configuration
158+
✔ Generate outputs
159+
✔ Validating plugins
160+
✔ Resolving contracts
161+
✔ Running plugins
162+
✔ Writing to src/hooks/contracts/generated.ts
157163

164+
$ yarn workspace @kleros/kleros-v2-web start-local
158165
Server running at http://localhost:1234
159166
✨ Built in 2.35s
160167
```

scripts/tmux-local-stack.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ if [ $? != 0 ]; then
3636
(( ++index ))
3737
tmux select-pane -t $index -T "WEB"
3838
tmux send-keys -t $index 'cd web' Enter
39-
tmux send-keys -t $index 'yarn start-local'
39+
tmux send-keys -t $index 'yarn generate && yarn start-local'
4040
fi
4141

4242
tmux attach-session -t $session

web/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@
2727
"clean": "rm dist/bundle.js",
2828
"start": "parcel",
2929
"start-local": "REACT_APP_SUBGRAPH_ENDPOINT=http://localhost:8000/subgraphs/name/kleros/kleros-v2-core-local parcel",
30-
"build": "yarn run generate-hooks && yarn run parcel build",
30+
"build": "yarn generate && yarn parcel build",
3131
"check-style": "eslint 'src/**/*.{js,jsx,ts,tsx}'",
3232
"check-types": "tsc --noEmit",
33-
"generate-gql": "graphql-codegen",
34-
"generate-hooks": "wagmi generate"
33+
"generate": "yarn generate:gql && yarn generate:hooks",
34+
"generate:gql": "graphql-codegen",
35+
"generate:hooks": "NODE_NO_WARNINGS=1 wagmi generate"
3536
},
3637
"prettier": "@kleros/kleros-v2-prettier-config",
3738
"devDependencies": {

0 commit comments

Comments
 (0)