Skip to content

Commit

Permalink
Repair yarn build and break up the monorepo (#1072)
Browse files Browse the repository at this point in the history
* Break up monorepo and update build action

* Fix husky

* Feedback applied
  • Loading branch information
marshall2112 authored Aug 23, 2024
1 parent d109f48 commit 7563c70
Show file tree
Hide file tree
Showing 12 changed files with 446 additions and 2,917 deletions.
25 changes: 0 additions & 25 deletions .eslintrc

This file was deleted.

18 changes: 9 additions & 9 deletions .github/workflows/dapp-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'yarn'
- uses: actions/cache@v3
with:
path: './node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- uses: actions/cache@v3
- name: Cache Dependencies
uses: actions/cache@v3
with:
path: 'apps/dapp/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('apps/dapp/yarn.lock') }}
- run: yarn install
- run: NODE_OPTIONS="--max_old_space_size=4096" yarn build
- name: Install Dependencies
run: yarn install
working-directory: apps/dapp
- name: Build
run: NODE_OPTIONS="--max_old_space_size=4096" yarn build
working-directory: apps/dapp
6 changes: 0 additions & 6 deletions .yarnrc

This file was deleted.

1 change: 1 addition & 0 deletions apps/dapp/.husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
2 changes: 1 addition & 1 deletion .husky/pre-commit → apps/dapp/.husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
. "$(dirname -- "$0")/_/husky.sh"

echo 'Linting...'
npx lint-staged
cd apps/dapp && npx lint-staged
7 changes: 5 additions & 2 deletions apps/dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"typechain": "typechain --target=ethers-v5 --out-dir src/types/typechain --glob abi/**/*.json",
"lint": "eslint ./src",
"prepare": "yarn typechain && yarn codegen:safe-api-v1",
"prepare": "yarn typechain && yarn codegen:safe-api-v1 && cd ../.. && husky apps/dapp/.husky",
"dev": "vite",
"compile": "tsc",
"vite:build": "vite build",
Expand Down Expand Up @@ -80,14 +80,17 @@
"babel-plugin-macros": "^3.1.0",
"babel-plugin-styled-components": "^2.1.4",
"env-cmd": "^10.1.0",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"husky": "^9.1.4",
"lint-staged": ">=10",
"openapi-typescript-codegen": "^0.25.0",
"prettier": "^2.5.0",
"standard-version": "^9.3.2",
"terser": "^5.30.4",
"tsconfig-paths-webpack-plugin": "^3.5.2",
"typechain": "^8.1.1",
"typescript": "^4.9.4",
"typescript": "^5.5.4",
"vite": "^5.2.10",
"vite-plugin-svgr": "^4.2.0"
}
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/src/components/Charts/LineChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export default function LineChart<T>(
}}
height={20}
formatter={legendFormatter}
onClick={(e) => toggleLineVisibility(e.dataKey)}
onClick={(e) => toggleLineVisibility(e.dataKey?.toString() || '')}
/>
) : null}
</ComposedChart>
Expand Down
21 changes: 19 additions & 2 deletions apps/dapp/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"module": "ESNext",
"target": "ES6",
"composite": true,
"declaration": true,
"declarationMap": true,
"incremental": true,
"sourceMap": true,
"noEmitOnError": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowJs": true,
"types": [],
"noEmit": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "Node",
"resolveJsonModule": true,
"isolatedModules": true,
"useDefineForClassFields": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"jsx": "react-jsx",
"baseUrl": "src",
"resolveJsonModule": true,
"paths": {
"components/*": ["./components/*"],
"pages/*": ["./pages/*"],
Expand Down
Loading

0 comments on commit 7563c70

Please sign in to comment.