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 "examples" directory for example frontends #73

Merged
merged 9 commits into from
Jun 29, 2024
Merged

Conversation

MAX-786
Copy link
Member

@MAX-786 MAX-786 commented Jun 26, 2024

updated example frontend readme for instructions.

@MAX-786 MAX-786 self-assigned this Jun 26, 2024
@MAX-786 MAX-786 requested a review from djay June 26, 2024 09:04
@JeffersonBledsoe
Copy link
Member

@MAX-786 You need to remove the @utils/hydra file, add - 'examples/*' to the pnpm-workspace file and update all the imports of @utils/hydra to be import { initBridge, onEditChange } from '@volto-hydra/hydra-js';

@JeffersonBledsoe
Copy link
Member

One other thing I added in #74 that should also be added here are some simple Makefile commands and an npm script to start the admin UI with the default URL set to the URL of the example frontend and a command to start the example frontend without having to know anything about it. E.g:

## Examples
.PHONY: example-astro-admin
example-astro-admin:
	RAZZLE_DEFAULT_IFRAME_URL=http://localhost:4321 pnpm start

.PHONY: example-astro-frontend
example-astro-frontend: ## Starts Volto, allowing reloading of the add-on during development
	pnpm example:astro

Then in package.json:

"example:astro": "pnpm --filter hydra-astro run dev"

@MAX-786
Copy link
Member Author

MAX-786 commented Jun 26, 2024

@JeffersonBledsoe Updated as per requested and also updated the readme for the instructions!

@MAX-786 MAX-786 merged commit 7a32cec into main Jun 29, 2024
1 check passed
@MAX-786 MAX-786 deleted the add-examples branch June 29, 2024 03:36
@MAX-786 MAX-786 mentioned this pull request Jun 29, 2024
@djay
Copy link
Member

djay commented Jun 30, 2024

@MAX-786 I notice the hydra.js is checked intot he example which is probably shouldn't be right?

@MAX-786
Copy link
Member Author

MAX-786 commented Jun 30, 2024

Oh thanks!! I'll remove it from the example folder, Just a little thing, what might be the better way to do it, a separate PR or just restore this branch add that commit and merge again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants