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

Adds an integration starter example #4877

Merged
merged 11 commits into from
Oct 7, 2022
Merged

Conversation

tony-sull
Copy link
Contributor

@tony-sull tony-sull commented Sep 26, 2022

Changes

Adds a new integration starter template, including a skeleton integration with links to docs and example usage in our @astrojs integrations

Testing

N/A

Docs

N/A

@tony-sull tony-sull requested a review from a team as a code owner September 26, 2022 19:22
@changeset-bot
Copy link

changeset-bot bot commented Sep 26, 2022

⚠️ No Changeset found

Latest commit: b3f25e3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added the pkg: example Related to an example package (scope) label Sep 26, 2022
return {
name: pkg.name,
hooks: {
'astro:config:setup': ({
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought it would be nice to stub in details for the most commonly used hooks

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fits in great as an empty starter, but I wonder if a minimal working example/demo might be especially helpful here, since it's hard to understand how to practically use each hook. We could fill in some or all of the hooks show you can use the arguments passed to each hook.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I was a little torn on this one as well. I originally had every hook stubbed in here as a comment with a note linking to the docs for more details

I couldn't think of a good example for the hooks that didn't become more opinionated but I'll take another stab at it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine to just add links to examples of these hooks being used by other integrations

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that's a great idea! I updated the integration skeleton to links for the API docs and a few example hooks in our @astrojs integrations

@@ -0,0 +1,45 @@
# Astro Starter Kit: Minimal
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be the same README file as the minimal starter kit. I'm assuming this should be customized for this starter?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep! I ended up removing the demo project and added a main README for the integration example (based on the component starter)

@tony-sull tony-sull merged commit e5c64c5 into main Oct 7, 2022
@tony-sull tony-sull deleted the feat/integration-example branch October 7, 2022 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: example Related to an example package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants