diff --git a/package.json b/package.json index 8931e53..4ee859e 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,10 @@ "format": "prettier . --write", "lint": "eslint . --config eslint.config.mjs --cache", "check": "npm run format && npm run lint", - "prepare": "husky" + "prepare": "husky", + "test": "pnpm -F @ayco/astro-sw test", + "build": "pnpm -F @ayco/astro-sw build", + "demo": "pnpm run build && pnpm -F demo build:preview" }, "repository": { "type": "git", diff --git a/package/src/astro-sw.ts b/package/src/astro-sw.ts index cce7bf0..a6266b4 100644 --- a/package/src/astro-sw.ts +++ b/package/src/astro-sw.ts @@ -11,16 +11,10 @@ import type { Config } from './types' import type { AstroIntegration } from 'astro' const ASTROSW = '@ayco/astro-sw' -/** - * @typedef {import('astro').AstroIntegration} AstroIntegration - * @typedef {import('esbuild').BuildOptions} BuildOptions - */ /** * Accepts configuration options with service worker path * and injects needed variables such as `__assets` generated by Astro - * @param {} options - * @returns {AstroIntegration} */ export default function serviceWorker(options: Config): AstroIntegration { const { diff --git a/test/astro-sw.test.js b/package/test/astro-sw.test.ts similarity index 100% rename from test/astro-sw.test.js rename to package/test/astro-sw.test.ts