Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Makefile #3540

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.PHONY: install
install:
npm i --legacy-peer-deps

.PHONY: build-graphql
build-graphql:
npm run build:graphql-docs

.PHONY: build-query
build-query:
npm run build:bruno-query

.PHONY: build-common
build-common:
npm run build:bruno-common

.PHONY: build-all
build-all: build-graphql build-query build-common

.PHONY: build-sandbox
build-sandbox:
npm run sandbox:bundle-libraries --workspace=packages/bruno-js

.PHONY: run-web
run-web:
npm run dev:web

.PHONY: run-app
run-app:
npm run dev:electron

.PHONY: run-dev
run-dev:
npm run dev
29 changes: 28 additions & 1 deletion contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ You would need [Node v20.x or the latest LTS version](https://nodejs.org/en/) an

Bruno is being developed as a desktop app. You need to load the app by running the Next.js app in one terminal and then run the electron app in another terminal.

### Local Development
### Local Development - npm

```bash
# use nodejs 20 version
Expand All @@ -69,6 +69,33 @@ npm run dev:web
npm run dev:electron
```

### Local Development - Makefile

```shell
# install deps
make install

# build packages
make build-graphql
make build-query
make build-common

# build all packages
make build-all

# bundle js sandbox libraries
make build-sandbox

# run next app (terminal 1)
make run-web

# run electron app (terminal 2)
make run-app

# run full suite locally
make run-dev
```

### Troubleshooting

You might encounter a `Unsupported platform` error when you run `npm install`. To fix this, you will need to delete `node_modules` and `package-lock.json` and run `npm install`. This should install all the necessary packages needed to run the app.
Expand Down