Skip to content

Commit

Permalink
Merge pull request #6 from EnsoFinance/nezouse-refactor
Browse files Browse the repository at this point in the history
Monorepo Refactor
  • Loading branch information
andre-meyer authored Oct 5, 2023
2 parents d3404f4 + ecad467 commit 37a05ad
Show file tree
Hide file tree
Showing 52 changed files with 7,794 additions and 878 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist/
node_modules/
.vscode
.github
3 changes: 2 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ module.exports = {
ecmaVersion: 'latest',
sourceType: 'module',
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
project: ['./use-defi/tsconfig.json', './playground/tsconfig.json'],
},
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': ['warn'],
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
},
};
19 changes: 7 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
{
"name": "@ensofinance/use-defi",
"version": "0.2.3",
"name": "use-defi-monorepo",
"version": "0.2.4",
"description": "React hooks library to use with enso shortcuts infrastructure",
"main": "index.js",
"scripts": {
"preinstall": "npx only-allow pnpm",
"postinstall": "pnpm generate",
"lint": "pnpm eslint src/*",
"test": "pnpm vitest run --root ./test --config ./vitest.config.ts",
"generate": "npx openapi-typescript https://api.enso.finance/api-json -o src/generated/api.d.ts",
"build": "pnpm generate && pnpm build:setup && rollup -c",
"build:setup": "pnpm gts clean && mkdir dist && jq 'del(.scripts) | del(.devDependencies) | del(.private) | del(.pnpm)' package.json > dist/package.json && cp README.md dist/README.md",
"lint": "pnpm eslint .",
"test": "pnpm vitest run --root ./use-defi/test --config ./vitest.config.ts",
"generate": "cd use-defi && pnpm generate",
"build": "cd use-defi && pnpm build",
"dev": "cd playground && vite dev"
},
"keywords": [],
Expand All @@ -19,15 +18,11 @@
"peerDependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-query": "^3.39.3",
"viem": "^1.2.15",
"wagmi": "^1.3.9"
},
"dependencies": {
"@ethersproject/providers": "^5.7.2",
"axios": "^1.4.0",
"dotenv": "^16.3.1",
"query-string": "^8.1.0"
"dotenv": "^16.3.1"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^25.0.2",
Expand Down
14 changes: 14 additions & 0 deletions playground/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "playground",
"private": true,
"scripts": {
"dev": "vite dev"
},
"devDependencies": {
"vite": "^4.4.0"
},
"dependencies": {
"@ensofinance/use-defi": "workspace:^",
"util": "^0.12.4"
}
}
315 changes: 315 additions & 0 deletions playground/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 37a05ad

Please sign in to comment.