Skip to content

Commit

Permalink
VVS UI
Browse files Browse the repository at this point in the history
  • Loading branch information
rayvvs committed Nov 27, 2021
1 parent 0c81930 commit 2ab1392
Show file tree
Hide file tree
Showing 2,770 changed files with 269,017 additions and 11,168 deletions.
9 changes: 8 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@
"src/mocks/**"
]
}
]
],
"react/default-props-match-prop-types": [1],
"react/require-default-props": 0,
"lines-between-class-members": 0,
"import/prefer-default-export": 0,
"@typescript-eslint/no-shadow": 0,
"no-restricted-syntax": 0,
"no-new": 0
},
"overrides": [
{
Expand Down
7 changes: 0 additions & 7 deletions .github/CODEOWNERS

This file was deleted.

4 changes: 0 additions & 4 deletions .github/pull_request_template.md

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/build.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/deploy-storybook.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/format.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/lint.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/test.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/tokenlist.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ storybook-static
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# development
.vscode
4 changes: 0 additions & 4 deletions .husky/commit-msg

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

139 changes: 128 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,144 @@
# Pancake Toolkit
# VVS Toolkit

This repository is a monorepo manage with [yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces/) and [Lerna](https://lerna.js.org/).

Forked from https://github.com/pancakeswap/pancake-toolkit

Imported https://github.com/pancakeswap/pancake-frontend

Imported https://github.com/pancakeswap/pancake-swap-sdk

Imported https://github.com/pancakeswap/pancake-info-api

## Packages

- [pancake-uikit](https://github.com/pancakeswap/pancake-toolkit/tree/master/packages/pancake-uikit) : React components used to build the Pancake UI
- [eslint-config-pancake](https://github.com/pancakeswap/pancake-toolkit/tree/master/packages/eslint-config-pancake) : An ESLint config for pancake, with Typescript and Prettier support
- [pancake-profile-sdk](https://github.com/pancakeswap/pancake-toolkit/tree/master/packages/pancake-profile-sdk) : Handy functions to retrieve data for Pancakeswap Profile system
- [token-lists](https://github.com/pancakeswap/pancake-toolkit/tree/master/packages/token-lists) : Main PancakeSwap token list and tools to validate it
- `vvs-uikit` : React components used to build the VVS UI
- `vvs-eslint-config` : An ESLint config for VVS, with Typescript and Prettier support
- `vvs-frontend` : Main VVS web app
- `vvs-info-api` : express nodejs API implementation for VVS on-chain data query
- `vvs-prelaunch` : prelaunch landing page with count down clock
- `vvs-profile-sdk` : Handy functions to retrieve data for VVS Profile system
- `vvs-swap-sdk`: Handy functions to retrieve data for VVS contracts
- `token-lists` : Main VVS token list and tools to validate it

## How to use

Clone the repository
### Install `lerna`

```
npm install --global lerna
```

### Install dependencies

```
lerna bootstrap
```

### Build `vvs-uikit`

```
lerna run build --scope=vvs-uikit
```

### Build `vvs-sdk`

```
lerna run build --scope=vvs-sdk
```
### Build `vvs-info-api`

```
lerna run build --scope=vvs-info-api
```

### Start `vvs-info-api`

```
lerna run start:dev --stream --scope=vvs-info-api
```

### Build `vvs-frontend`

```
lerna run build --scope=vvs-frontend
```

### Start `vvs-frontend`

```
lerna run start --stream --scope=vvs-frontend
```

### Start `vss-frontend` with build the dependencies

```
git clone [email protected]:pancakeswap/pancake-toolkit.git
lerna run build --scope={vvs-uikit,vvs-sdk} && lerna run start --stream --scope=vvs-frontend
```

Run yarn at the root of the workspace
### Run test

```
cd pancake-toolkit
yarn
lerna run test
```

Then, refer to the readme of each project.
### Run lint

```
lerna run lint
```

### Run prettier check
```
lerna run format:check
```

## Troubleshooting

### Add child package to existing monorepo with git history

```
lerna import ~/pancake-frontend --flatten
lerna import ~/pancake-swap-sdk --flatten
lerna import ~/pancake-info-api --flatten
```

`--flatten` is important and commit history may lost without it
change `name` in `<child>/package.json` after imported

### Add sibling dependencies

```
lerna add vvs-uikit --scope=vvs-frontend
lerna add vvs-sdk --scope=vvs-frontend
```

### Remove child dependencies (when changing branches with different dependencies)

```
lerna clean -y
```

### Remove root dependencies

```
rm -rf node_modules
```

### Remove locked dependencies

```
rm yarn.lock
```

### Resolve incorrect version of dependencies

Change package version in `<root>/package.json`

## References

https://medium.com/mitterio/multirepo-to-lerna-js-monorepo-80f6657cb443

https://stackoverflow.com/questions/60906133/cannot-add-dependency-to-sibling-monorepo-package-using-lerna

https://github.com/lerna/lerna/issues/2352
Loading

0 comments on commit 2ab1392

Please sign in to comment.