Skip to content

Commit

Permalink
Merge pull request #12 from vechainfoundation/11-change-pnpm-to-yarn
Browse files Browse the repository at this point in the history
feat: changes from pnpm to yarn and fixes readme
  • Loading branch information
davidecarpini authored Oct 25, 2023
2 parents cc4986d + dc387f6 commit 159d0de
Show file tree
Hide file tree
Showing 12 changed files with 16,724 additions and 17,768 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/lint-build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false
node-version-file: .nvmrc
cache: "yarn"

- name: Install
run: pnpm install:all
run: yarn install:all

- name: Lint
run: pnpm run lint
run: yarn run lint

- name: Build
run: pnpm run build
run: yarn run build
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.16.1
56 changes: 48 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,71 @@
# vechain-dapp-kit

This is a DApp Kit for Vechain.
VeWorld WalletKit is a typescript library that facilitates seamless interaction between VeChain wallets (veworld, sync 2) and dApps, enhancing user experience and developer convenience.

## Why ?

- Allow easy interaction with all wallets.
- Currently, connex only plays nice with Sync / Sync2
- Enable a better UX for users

## Setting up the project
## Key features

### Install dependencies
Key Features a.k.a scope

1. wallet connectivity

key components that handle interaction with veworld and sync 2

2. customizable UI

ability to totally customize the UI of components

3. User Experience

Consistent experience with Ethereum and other chains

4. Developer friendly

Easy to adopt with proper documentation.

## Setting up the project (Common flow)

### Install & build dependencies

```bash
pnpm install
yarn install:all
```

### Build the packages & apps
### Run in Dev Mode

```bash
pnpm build
yarn dev
```

### Run in Dev Mode
## Useful scripts

### Clean project

```bash
yarn clean
```

### Install yarn packages

```bash
yarn
```

### Build dependencies

```bash
yarn build:deps
```

### Build release

```bash
pnpm dev
yarn build
```

### Future Work
Expand Down
59 changes: 31 additions & 28 deletions apps/sample-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,38 @@
"homepage": ".",
"main": "src/index.js",
"scripts": {
"postinstall": "pnpm compile",
"start": "HTTPS=true react-app-rewired start",
"build": "yarn compile && react-app-rewired build",
"clean": "rm -rf build node_modules .turbo cache artifacts src/hardhat",
"compile": "yarn hardhat compile",
"dev": "react-app-rewired start",
"build": "pnpm compile && react-app-rewired build",
"test": "echo 'Not yet testing'",
"eject": "react-app-rewired eject",
"compile": "hardhat compile",
"postinstall": "yarn compile",
"lint": "eslint src --ext .js,.jsx,.ts,.tsx",
"clean": "rm -rf build node_modules .turbo cache artifacts src/hardhat"
"start": "HTTPS=true react-app-rewired start",
"test": "echo 'Not yet testing'"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"dependencies": {
"@chakra-ui/react": "^2.8.1",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@heroicons/react": "^2.0.18",
"@vechain/connex": "2.1.0",
"@vechain/hardhat-vechain": "^0.1.4",
Expand All @@ -27,18 +46,19 @@
"buffer": "^6.0.3",
"crypto-browserify": "^3.12.0",
"ethers": "^6.8.0",
"framer-motion": "3.10.6",
"https-browserify": "^1.0.0",
"os-browserify": "^0.3.0",
"process": "^0.11.10",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.4.2",
"react-scripts": "5.0.1",
"react-vendor": "workspace:*",
"react-vendor": "*",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"thor-devkit": "^2.0.9",
"wallet-connect": "workspace:*",
"wallet-connect": "*",
"web-vitals": "^2.1.2"
},
"devDependencies": {
Expand All @@ -53,33 +73,16 @@
"@types/testing-library__jest-dom": "^5.14.5",
"copy-webpack-plugin": "^11.0.0",
"customize-cra": "^1.0.0",
"eslint-config-custom": "workspace:*",
"eslint-config-custom": "*",
"filemanager-webpack-plugin": "^8.0.0",
"hardhat": "^2.18.2",
"mini-css-extract-plugin": "^2.7.6",
"react-app-rewired": "^2.2.1",
"ts-import-plugin": "^3.0.0",
"ts-loader": "^9.5.0",
"tsconfig": "workspace:*",
"ts-node": "^10.9.1",
"tsconfig": "*",
"typescript": "4.9.5",
"webpack": "^5.88.2"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
56 changes: 36 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,20 @@
{
"private": true,
"workspaces": [
"apps/*",
"packages/*"
],
"scripts": {
"clean": "turbo run clean; rm -rf node_modules .turbo",
"build": "turbo run build",
"build:deps": "turbo build --no-daemon --filter=react-vendor --filter=wallet-connect",
"install:all": "pnpm i && pnpm run build:deps",
"reinstall": "pnpm clean && pnpm i && pnpm run build:deps",
"clean": "npx turbo@latest run clean && rm -rf node_modules .turbo",
"dev": "turbo run dev --no-daemon",
"start": "turbo run start --no-daemon",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"install:all": "yarn && yarn run build:deps",
"lint": "turbo run lint",
"build": "turbo run build",
"test": "turbo run test",
"prepare": "husky install"
},
"devDependencies": {
"@commitlint/config-conventional": "^18.0.0",
"commitlint": "^18.0.0",
"eslint": "^8.4.1",
"eslint-config-custom": "workspace:*",
"eslint-plugin-prefer-arrow": "1.2.3",
"husky": "^8.0.0",
"lint-staged": "^15.0.2",
"prettier": "^2.5.1",
"tsconfig": "workspace:*",
"turbo": "latest"
"prepare": "husky install",
"reinstall": "yarn clean && yarn && yarn run build:deps",
"test": "turbo run test"
},
"husky": {
"hooks": {
Expand All @@ -39,5 +30,30 @@
"eslint"
]
},
"packageManager": "[email protected]"
"devDependencies": {
"@commitlint/config-conventional": "^18.0.0",
"@nomicfoundation/hardhat-chai-matchers": "^2.0.2",
"@nomicfoundation/hardhat-ethers": "^3.0.4",
"@nomicfoundation/hardhat-network-helpers": "^1.0.9",
"@nomicfoundation/hardhat-verify": "^1.1.1",
"@typechain/ethers-v6": "^0.4.3",
"@typechain/hardhat": "^8.0.3",
"@types/chai": "^4.3.9",
"@types/mocha": "^10.0.3",
"chai": "^4.3.10",
"commitlint": "^18.0.0",
"eslint": "^8.4.1",
"eslint-config-custom": "*",
"eslint-plugin-prefer-arrow": "1.2.3",
"ethers": "^6.8.0",
"hardhat-gas-reporter": "^1.0.9",
"husky": "^8.0.0",
"lint-staged": "^15.0.2",
"prettier": "^2.5.1",
"solidity-coverage": "^0.8.5",
"tsconfig": "*",
"turbo": "latest",
"typechain": "^8.3.2"
},
"packageManager": "[email protected]"
}
4 changes: 2 additions & 2 deletions packages/eslint-config-custom/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "eslint-config-custom",
"license": "MIT",
"version": "0.0.0",
"private": true,
"license": "MIT",
"devDependencies": {
"@vercel/style-guide": "^4.0.2",
"eslint-config-turbo": "^1.10.12"
"eslint-config-turbo": "latest"
}
}
6 changes: 3 additions & 3 deletions packages/react-vendor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
"@vechain/connex": "2.1.0",
"@vechain/connex-framework": "2.1.0",
"thor-devkit": "^2.0.9",
"wallet-connect": "workspace:*"
"wallet-connect": "*"
},
"devDependencies": {
"@types/react": "^18.2.28",
"@types/react-dom": "^18.2.13",
"eslint": "^8.4.1",
"eslint-config-custom": "workspace:*",
"eslint-config-custom": "*",
"react": "^18.2.0",
"tsconfig": "workspace:*",
"tsconfig": "*",
"tsup": "^5.10.1",
"typescript": "4.9.5"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/tsconfig/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tsconfig",
"version": "0.0.0",
"version": "0.0.1",
"private": true,
"license": "MIT",
"files": [
Expand Down
6 changes: 3 additions & 3 deletions packages/wallet-connect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
"@walletconnect/utils": "2.10.2"
},
"devDependencies": {
"@walletconnect/types": "2.10.2",
"@vechain/connex-types": "2.1.0",
"eslint-config-custom": "workspace:*",
"tsconfig": "workspace:*",
"@walletconnect/types": "2.10.2",
"eslint": "^8.4.1",
"eslint-config-custom": "*",
"tsconfig": "*",
"tsup": "^5.10.1",
"typescript": "4.9.5"
}
Expand Down
Loading

0 comments on commit 159d0de

Please sign in to comment.