0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00

[ci] format

This commit is contained in:
Florian Lefebvre 2024-01-24 14:44:08 +00:00 committed by astrobot-houston
parent 1153331cbb
commit 60136f9c56
3 changed files with 29 additions and 29 deletions

View file

@ -46,4 +46,4 @@
"publishConfig": {
"provenance": true
}
}
}

View file

@ -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;
}

View file

@ -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');
});
});