-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2,770 changed files
with
269,017 additions
and
11,168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,6 @@ storybook-static | |
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# development | ||
.vscode |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.