Skip to content

Commit

Permalink
[fix] replace yarn with bun (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
Diogomartf authored Jun 12, 2024
1 parent 680d1ff commit e05298d
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 61 deletions.
7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ dist
.DS_Store
tsconfig.tsbuildinfo

.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions

.env.local
.env

Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Stackly is a Next.js Cloudflare mono repo project that implements Dollar Cost Av
Before you can run this project, make sure you have the following software installed:

- Node.js 18 or higher
- Yarn
- Bun
- Git

## Getting Started
Expand All @@ -24,14 +24,14 @@ git clone https://github.com/SwaprHQ/stackly-ui.git

```
cd stackly-ui
yarn install
yarn build:dev
bun install
bun build:dev
```

3. Start the development server:

```
yarn dev
bun dev
```

The development server will start at http://localhost:3000.
Expand All @@ -45,16 +45,16 @@ Make sure that, `bin/config.ts` is updated to reflect the latest changes for con
To deploy the Subgraph, you need to run the following commands:

```
yarn build
yarn deploy
bun build
bun deploy
```

## Deployment

To deploy the Stackly project to production, you can use the following command:

```
yarn build
bun build
```

This command will create a production build of the project in the `dist` directory. You can then deploy the contents of this directory to your server or hosting provider.
Expand All @@ -69,8 +69,8 @@ This command will create a production build of the project in the `dist` directo
- CoW Protcol's settlement address
- Add that information in `packages\sdk\src\vaults\constants.ts`
- `cd packages/sdk`
- `yarn typechain`
- `yarn build`
- `bun typechain`
- `bun build`
2. Update the Subraph.
- Go to `packages\subgraph\bin\config.ts` and update the config object with the Factory contract `address` and `startBlock`
- Go to `packages\subgraph\bin\build-subgraph.ts` and update the `SUPPORTED_NETWORKS` variable
Expand Down Expand Up @@ -107,13 +107,13 @@ React Context checks values using simple equality (`==`). For that reason, we ne

- Error fetching `generated/contracts`.

This may happen due to app build failures. Try deleting `node_modules`, then re-install and rebuild the app before launching it again. Note that if you don't rebuild the app (`yarn build:app`) you may get some errors due to generated code during the build step not being present.
This may happen due to app build failures. Try deleting `node_modules`, then re-install and rebuild the app before launching it again. Note that if you don't rebuild the app (`bun build:app`) you may get some errors due to generated code during the build step not being present.

```bash
rm -rf node_modules
yarn install
yarn build:app
yarn dev
bun install
bun build:app
bun dev
```

## Contributing
Expand All @@ -123,8 +123,8 @@ We welcome contributions to Stackly! To get started, fork this repository and cr
Before submitting a pull request, make sure that your code passes the linting and formatting checks:

```
yarn lint
yarn typecheck
bun lint
bun typecheck
```
## License
Expand Down
2 changes: 1 addition & 1 deletion packages/app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


```bash
yarn dev
bun dev
```

The app should be up and running at http://localhost:3000.
7 changes: 0 additions & 7 deletions packages/landing/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ dist
.DS_Store
tsconfig.tsbuildinfo

.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions

# local env files
.env.local
.env
Expand Down
27 changes: 2 additions & 25 deletions packages/landing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,7 @@ This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next
First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
12 changes: 6 additions & 6 deletions packages/subgraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"scripts": {
"auth": "graph auth --studio $DEPLOY_KEY",
"codegen": "graph codegen",
"build:gnosis": "yarn run prepare:gnosis && graph build",
"build:mainnet": "yarn run prepare:mainnet && graph build",
"build:arbitrum-one": "yarn run prepare:arbitrum-one && graph build",
"prepare:gnosis": "ts-node bin/build-subgraph.ts gnosis && yarn run codegen",
"prepare:mainnet": "ts-node bin/build-subgraph.ts mainnet && yarn run codegen",
"prepare:arbitrum-one": "ts-node bin/build-subgraph.ts arbitrum-one && yarn run codegen",
"build:gnosis": "bun run prepare:gnosis && graph build",
"build:mainnet": "bun run prepare:mainnet && graph build",
"build:arbitrum-one": "bun run prepare:arbitrum-one && graph build",
"prepare:gnosis": "ts-node bin/build-subgraph.ts gnosis && bun run codegen",
"prepare:mainnet": "ts-node bin/build-subgraph.ts mainnet && bun run codegen",
"prepare:arbitrum-one": "ts-node bin/build-subgraph.ts arbitrum-one && bun run codegen",
"deploy:mainnet": "graph deploy --studio stackly-ethereum",
"deploy:gnosis": "graph deploy --studio stackly",
"deploy:arbitrum-one": "graph deploy --studio stackly-arbitrum-one",
Expand Down

0 comments on commit e05298d

Please sign in to comment.