File tree Expand file tree Collapse file tree 7 files changed +46
-7
lines changed Expand file tree Collapse file tree 7 files changed +46
-7
lines changed Original file line number Diff line number Diff line change 22
22
"postinstall" : " husky install" ,
23
23
"clean" : " yarn workspaces foreach --all --parallel --verbose run clean" ,
24
24
"clean:all" : " yarn clean && rm -rf node_modules packages/*/node_modules" ,
25
- "build" : " yarn workspaces foreach --all --verbose run build" ,
25
+ "build" : " chmod +x ./scripts/build && ./scripts/ build" ,
26
26
"lint" : " yarn workspaces foreach --all --parallel --verbose run lint" ,
27
27
"test" : " yarn workspaces foreach --all --parallel --verbose --interlaced run test"
28
28
},
Original file line number Diff line number Diff line change 17
17
"types" : " dist/src/index.d.ts" ,
18
18
"scripts" : {
19
19
"build" : " tsc" ,
20
+ "clean" : " rm -rf dist" ,
20
21
"lint" : " eslint '**/*.{js,ts}' --fix" ,
21
22
"test" : " mocha --exit --recursive 'test/**/*.test.ts'" ,
22
23
"prepublishOnly" : " npm run build"
Original file line number Diff line number Diff line change @@ -4,10 +4,13 @@ import '@nomicfoundation/hardhat-ignition-ethers'
4
4
import 'hardhat-storage-layout'
5
5
import 'hardhat-contract-sizer'
6
6
import 'hardhat-secure-accounts'
7
- import 'hardhat-graph-protocol'
8
7
9
8
import type { HardhatUserConfig } from 'hardhat/config'
10
9
10
+ if ( process . env . BUILD_RUN !== 'true' ) {
11
+ require ( 'hardhat-graph-protocol' )
12
+ }
13
+
11
14
const config : HardhatUserConfig = {
12
15
solidity : {
13
16
version : '0.8.27' ,
Original file line number Diff line number Diff line change 14
14
"lint:ts" : " eslint '**/*.{js,ts}' --fix" ,
15
15
"lint:sol" : " prettier --write contracts/**/*.sol && solhint --noPrompt --fix contracts/**/*.sol --config node_modules/solhint-graph-config/index.js" ,
16
16
"lint" : " yarn lint:ts && yarn lint:sol" ,
17
- "clean" : " rm -rf build cache typechain-types" ,
18
- "build" : " forge build && hardhat compile" ,
17
+ "clean" : " rm -rf build dist cache cache_forge typechain-types" ,
18
+ "build" : " forge build --skip test && SKIP_LOAD=true hardhat compile" ,
19
19
"test" : " forge test && hardhat test"
20
20
},
21
21
"devDependencies" : {
Original file line number Diff line number Diff line change @@ -5,10 +5,13 @@ import 'hardhat-contract-sizer'
5
5
import 'hardhat-storage-layout'
6
6
import 'hardhat-secure-accounts'
7
7
import 'solidity-docgen'
8
- import 'hardhat-graph-protocol'
9
8
10
9
import { HardhatUserConfig } from 'hardhat/config'
11
10
11
+ if ( process . env . BUILD_RUN !== 'true' ) {
12
+ require ( 'hardhat-graph-protocol' )
13
+ }
14
+
12
15
const config : HardhatUserConfig = {
13
16
solidity : {
14
17
version : '0.8.27' ,
Original file line number Diff line number Diff line change 14
14
"lint:ts" : " eslint '**/*.{js,ts}' --fix" ,
15
15
"lint:sol" : " prettier --write contracts/**/*.sol && solhint --noPrompt --fix contracts/**/*.sol --config node_modules/solhint-graph-config/index.js" ,
16
16
"lint" : " yarn lint:ts && yarn lint:sol" ,
17
- "clean" : " rm -rf build cache typechain-types" ,
18
- "build" : " forge build && hardhat compile" ,
17
+ "clean" : " rm -rf build dist cache cache_forge typechain-types" ,
18
+ "build" : " forge build --skip test && SKIP_LOAD=true hardhat compile" ,
19
19
"test" : " forge test && hardhat test"
20
20
},
21
21
"devDependencies" : {
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # List of packages to build - order matters!
4
+ packages=(
5
+ " packages/eslint-graph-config"
6
+ # "packages/solhint-graph-config" -- disabled since it doesn't have a build script
7
+ # "packages/solhint-plugin-graph" -- disabled since it doesn't have a build script
8
+ " packages/contracts"
9
+ " packages/horizon"
10
+ " packages/subgraph-service"
11
+ " packages/hardhat-graph-protocol"
12
+ " packages/data-edge"
13
+ " packages/sdk"
14
+ " packages/token-distribution"
15
+ )
16
+
17
+ for package in " ${packages[@]} " ; do
18
+ echo -e " \n\n==== Building $package ..."
19
+
20
+ cd " $package " || { echo " Failed to navigate to $package " ; exit 1; }
21
+
22
+ if BUILD_RUN=true yarn build; then
23
+ echo " Successfully built $package "
24
+ else
25
+ echo " Build failed for $package " >&2
26
+ exit 1
27
+ fi
28
+
29
+ cd - > /dev/null
30
+ done
31
+
32
+ echo " All packages built successfully!"
You can’t perform that action at this time.
0 commit comments