diff --git a/packages/integrations/alpinejs/package.json b/packages/integrations/alpinejs/package.json index e81e42f0bc..f612167a81 100644 --- a/packages/integrations/alpinejs/package.json +++ b/packages/integrations/alpinejs/package.json @@ -46,4 +46,4 @@ "publishConfig": { "provenance": true } -} \ No newline at end of file +} diff --git a/packages/integrations/alpinejs/src/index.ts b/packages/integrations/alpinejs/src/index.ts index a5f20aa67d..77ea68c746 100644 --- a/packages/integrations/alpinejs/src/index.ts +++ b/packages/integrations/alpinejs/src/index.ts @@ -4,32 +4,32 @@ import { resolve } from 'node:path'; interface Options { /** - * You can extend Alpine by setting this option to a root-relative import specifier (for example, `entrypoint: "/src/entrypoint"`). - * - * The default export of this file should be a function that accepts an Alpine instance prior to starting, allowing the use of custom directives, plugins and other customizations for advanced use cases. - * - * ```js - * // astro.config.mjs - * import { defineConfig } from 'astro/config'; - * import alpine from '@astrojs/alpinejs'; - * - * export default defineConfig({ - * // ... - * integrations: [alpine({ entrypoint: '/src/entrypoint' })], - * }); - * ``` - * - * ```js - * // src/entrypoint.ts - * import type { Alpine } from 'alpinejs' - * - * export default (Alpine: Alpine) => { - * Alpine.directive('foo', el => { - * el.textContent = 'bar'; - * }) - * } - * ``` - */ + * You can extend Alpine by setting this option to a root-relative import specifier (for example, `entrypoint: "/src/entrypoint"`). + * + * The default export of this file should be a function that accepts an Alpine instance prior to starting, allowing the use of custom directives, plugins and other customizations for advanced use cases. + * + * ```js + * // astro.config.mjs + * import { defineConfig } from 'astro/config'; + * import alpine from '@astrojs/alpinejs'; + * + * export default defineConfig({ + * // ... + * integrations: [alpine({ entrypoint: '/src/entrypoint' })], + * }); + * ``` + * + * ```js + * // src/entrypoint.ts + * import type { Alpine } from 'alpinejs' + * + * export default (Alpine: Alpine) => { + * Alpine.directive('foo', el => { + * el.textContent = 'bar'; + * }) + * } + * ``` + */ entrypoint?: string; } diff --git a/packages/integrations/alpinejs/test/basics.test.js b/packages/integrations/alpinejs/test/basics.test.js index ae6a06a235..440e2a6b5b 100644 --- a/packages/integrations/alpinejs/test/basics.test.js +++ b/packages/integrations/alpinejs/test/basics.test.js @@ -7,7 +7,7 @@ test.describe('Basics', () => { test('Alpine is working', async ({ page, astro }) => { await page.goto(astro.resolveUrl('/')); - const el = page.locator("#foo") - expect(await el.textContent()).toBe('bar') + const el = page.locator('#foo'); + expect(await el.textContent()).toBe('bar'); }); });