mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
7b4f284020
* feat(toolbar): Add a `astro:toolbar` module * fix: use entrypoint * feat: add new shape for defining toolbar apps * fix: types * feat(toolbar): Add helpers features (#10667) * feat(toolbar): Add helpers features * fix: consistent payloads and naming * chore: changeset * nit: rename eventTarget to app * feat: add server-side helpers * test: update test to use new APIs * fix: types * nit: erikaaaaa * feat: add new event * Update .changeset/khaki-pianos-burn.md * test: use data to create text * Apply suggestions from code review Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev> * nit: use diff * nit: documentation effort * test: fix --------- Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev> * nit: small changes to helpers * nit: update changeset * fix: move to astro/toolbar for building purposes * feat(toolbar): Add a toolbar example (#10793) * feat: add a toolbar starter * test: skip examples that are not Astro projects * nit: small changes * feat: setup for build step * fix: add to devdep * docs: add commands to README * fix: reorder classes to make more sense * fix: add improvements from recipe * Apply suggestions from code review Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> --------- Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
17 lines
488 B
TypeScript
17 lines
488 B
TypeScript
import { fileURLToPath } from 'node:url';
|
|
import type { AstroIntegration } from 'astro';
|
|
|
|
// API Reference: https://docs.astro.build/en/reference/integrations-reference/
|
|
export default {
|
|
name: 'my-astro-integration',
|
|
hooks: {
|
|
'astro:config:setup': ({ addDevToolbarApp }) => {
|
|
addDevToolbarApp({
|
|
id: "my-toolbar-app",
|
|
name: "My Toolbar App",
|
|
icon: "🚀",
|
|
entrypoint: fileURLToPath(new URL('./app.js', import.meta.url))
|
|
});
|
|
},
|
|
},
|
|
} satisfies AstroIntegration;
|