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",
|
"format": "prettier . --write",
|
||||||
"lint": "eslint . --config eslint.config.mjs --cache",
|
"lint": "eslint . --config eslint.config.mjs --cache",
|
||||||
"check": "npm run format && npm run lint",
|
"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": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -11,16 +11,10 @@ import type { Config } from './types'
|
||||||
import type { AstroIntegration } from 'astro'
|
import type { AstroIntegration } from 'astro'
|
||||||
|
|
||||||
const ASTROSW = '@ayco/astro-sw'
|
const ASTROSW = '@ayco/astro-sw'
|
||||||
/**
|
|
||||||
* @typedef {import('astro').AstroIntegration} AstroIntegration
|
|
||||||
* @typedef {import('esbuild').BuildOptions} BuildOptions
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Accepts configuration options with service worker path
|
* Accepts configuration options with service worker path
|
||||||
* and injects needed variables such as `__assets` generated by Astro
|
* and injects needed variables such as `__assets` generated by Astro
|
||||||
* @param {} options
|
|
||||||
* @returns {AstroIntegration}
|
|
||||||
*/
|
*/
|
||||||
export default function serviceWorker(options: Config): AstroIntegration {
|
export default function serviceWorker(options: Config): AstroIntegration {
|
||||||
const {
|
const {
|
||||||
|
|
Loading…
Reference in a new issue