chore: organize workspace scripts
This commit is contained in:
parent
e5f644e241
commit
00e382dc70
3 changed files with 4 additions and 7 deletions
|
@ -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",
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue