summaryrefslogtreecommitdiff
path: root/examples/integration/index.ts
diff options
context:
space:
mode:
authorGravatar Tony Sullivan <tony.f.sullivan@outlook.com> 2022-10-07 16:06:51 +0000
committerGravatar GitHub <noreply@github.com> 2022-10-07 16:06:51 +0000
commite5c64c51c148226423fe07a44f00ee10f7c37a23 (patch)
tree38725bd49987812d9d59f8c21280c5f23ef9dc32 /examples/integration/index.ts
parent4e8625fbfb3b51e0da25a8f8c5b44f2797c53124 (diff)
downloadastro-e5c64c51c148226423fe07a44f00ee10f7c37a23.tar.gz
astro-e5c64c51c148226423fe07a44f00ee10f7c37a23.tar.zst
astro-e5c64c51c148226423fe07a44f00ee10f7c37a23.zip
Adds an integration starter example (#4877)
* adding an integration starter example * chore: linter fixes * removing components from the integration example * removing the monorepo and demo project, adding links to docs and examples * chore: update lock file * typo fix
Diffstat (limited to '')
-rw-r--r--examples/integration/index.ts23
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/integration/index.ts b/examples/integration/index.ts
new file mode 100644
index 000000000..2c7249b83
--- /dev/null
+++ b/examples/integration/index.ts
@@ -0,0 +1,23 @@
+import type { AstroIntegration } from 'astro';
+
+export default function createIntegration(): AstroIntegration {
+ // See the Integration API docs for full details
+ // https://docs.astro.build/en/reference/integrations-reference/
+ return {
+ name: '@example/my-integration',
+ hooks: {
+ 'astro:config:setup': () => {
+ // See the @astrojs/react integration for an example
+ // https://github.com/withastro/astro/blob/main/packages/integrations/react/src/index.ts
+ },
+ 'astro:build:start': ({ buildConfig }) => {
+ // See the @astrojs/netlify integration for an example
+ // https://github.com/withastro/astro/blob/main/packages/integrations/netlify/src/integration-functions.ts
+ },
+ 'astro:build:done': ({ dir, routes }) => {
+ // See the @astrojs/partytown integration for an example
+ // https://github.com/withastro/astro/blob/main/packages/integrations/partytown/src/index.ts
+ },
+ },
+ };
+}