-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Conversation
|
return { | ||
name: pkg.name, | ||
hooks: { | ||
'astro:config:setup': ({ |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
examples/integration/demo/README.md
Outdated
@@ -0,0 +1,45 @@ | |||
# Astro Starter Kit: Minimal |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)
Changes
Adds a new
integration
starter template, including a skeleton integration with links to docs and example usage in our @astrojs integrationsTesting
N/A
Docs
N/A