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

Add Makefile #16

Merged
merged 1 commit into from
Jan 17, 2024
Merged
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
43 changes: 43 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
########################
#### Python targets ####
########################

install_pipx:
brew install pipx
pipx ensurepath

install_poetry:
pipx install [email protected] poetry==1.7.1

## This can be run outside of the Python virtual environment ##
py_reqs: # Install Python requirements (enter shell via "[email protected] shell")
( \
cd backend && \
[email protected] install --no-root \
)

########################
#### NodeJS targets ####
########################

create_nenv: # Create Node virtual environment (enter via ". env/bin/activate")
( \
cd frontend && \
nodeenv env --node=20.11.0 \
)

########################
#### GraphQL targets ###
########################

## Run this target inside the Python virtual environment ##
graphql-schema: ## Codegen GraphQL schema
mkdir -p frontend/src/graphql/__generated__
strawberry export-schema backend.graphql.schema:schema > frontend/src/graphql/__generated__/schema.graphql

## Run this target inside the Node virtual environment ##
graphql-client: ## Codegen client GraphQL types
( \
cd frontend && \
npm run graphql-codegen \
)
Loading