@vite-pwa/vitepress 0.0.4 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +3 -1
- package/dist/index.cjs +3 -3
- package/dist/index.d.ts +6 -6
- package/dist/index.mjs +3 -3
- package/package.json +15 -15
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2022 Anthony Fu<https://github.com/antfu>
|
|
3
|
+
Copyright (c) 2022-PRESENT Anthony Fu <https://github.com/antfu>
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -40,6 +40,8 @@ Zero-config PWA Plugin for VitePress
|
|
|
40
40
|
- ⚙️ **Stale-while-revalidate**: automatic reload when new content is available
|
|
41
41
|
- ✨ **Static assets handling**: configure static assets for offline support
|
|
42
42
|
- 🐞 **Development Support**: debug your custom service worker logic as you develop your application
|
|
43
|
+
- 🛠️ **Versatile**: integration with meta frameworks: [îles](https://github.com/ElMassimo/iles), [SvelteKit](https://github.com/sveltejs/kit), [VitePress](https://github.com/vuejs/vitepress), [Astro](https://github.com/withastro/astro), and [Nuxt 3](https://github.com/nuxt/nuxt)
|
|
44
|
+
- 💥 PWA Assets Generator: generate all the PWA assets from a single command and a single source image
|
|
43
45
|
|
|
44
46
|
## 📦 Install
|
|
45
47
|
|
|
@@ -84,4 +86,4 @@ Check out the type declaration [src/types.ts](./src/types.ts) and the following
|
|
|
84
86
|
|
|
85
87
|
## 📄 License
|
|
86
88
|
|
|
87
|
-
MIT License
|
|
89
|
+
[MIT](./LICENSE) License © 2022-PRESENT [Anthony Fu](https://github.com/antfu)
|
package/dist/index.cjs
CHANGED
|
@@ -42,9 +42,9 @@ function withPwa(config) {
|
|
|
42
42
|
name: "vite-plugin-pwa:vitepress",
|
|
43
43
|
apply: "build",
|
|
44
44
|
enforce: "post",
|
|
45
|
-
configResolved(
|
|
46
|
-
if (!
|
|
47
|
-
api =
|
|
45
|
+
configResolved(resolvedViteConfig) {
|
|
46
|
+
if (!resolvedViteConfig.build.ssr)
|
|
47
|
+
api = resolvedViteConfig.plugins.find((p) => p.name === "vite-plugin-pwa")?.api;
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { UserConfig } from 'vitepress';
|
|
2
2
|
import { VitePWAOptions } from 'vite-plugin-pwa';
|
|
3
3
|
|
|
4
|
-
interface PwaOptions extends Partial<VitePWAOptions> {
|
|
5
|
-
}
|
|
6
|
-
declare module 'vitepress' {
|
|
7
|
-
interface UserConfig {
|
|
8
|
-
pwa?: PwaOptions;
|
|
9
|
-
}
|
|
4
|
+
interface PwaOptions extends Partial<VitePWAOptions> {
|
|
5
|
+
}
|
|
6
|
+
declare module 'vitepress' {
|
|
7
|
+
interface UserConfig {
|
|
8
|
+
pwa?: PwaOptions;
|
|
9
|
+
}
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
declare function withPwa(config: UserConfig): UserConfig<any>;
|
package/dist/index.mjs
CHANGED
|
@@ -40,9 +40,9 @@ function withPwa(config) {
|
|
|
40
40
|
name: "vite-plugin-pwa:vitepress",
|
|
41
41
|
apply: "build",
|
|
42
42
|
enforce: "post",
|
|
43
|
-
configResolved(
|
|
44
|
-
if (!
|
|
45
|
-
api =
|
|
43
|
+
configResolved(resolvedViteConfig) {
|
|
44
|
+
if (!resolvedViteConfig.build.ssr)
|
|
45
|
+
api = resolvedViteConfig.plugins.find((p) => p.name === "vite-plugin-pwa")?.api;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
);
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vite-pwa/vitepress",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0
|
|
5
|
-
"packageManager": "pnpm@
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"packageManager": "pnpm@8.6.1",
|
|
6
6
|
"description": "Zero-config PWA for VitePress",
|
|
7
7
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
8
8
|
"license": "MIT",
|
|
@@ -40,24 +40,24 @@
|
|
|
40
40
|
"lint": "eslint .",
|
|
41
41
|
"lint-fix": "nr lint --fix",
|
|
42
42
|
"prepublishOnly": "npm run build",
|
|
43
|
-
"release": "
|
|
43
|
+
"release": "bumpp && npm publish"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"vite-plugin-pwa": "
|
|
46
|
+
"vite-plugin-pwa": ">=0.16.3 <1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@antfu/eslint-config": "^0.
|
|
50
|
-
"@antfu/ni": "^0.
|
|
51
|
-
"@types/debug": "^4.1.
|
|
52
|
-
"@
|
|
53
|
-
"
|
|
54
|
-
"eslint": "^8.
|
|
49
|
+
"@antfu/eslint-config": "^0.39.5",
|
|
50
|
+
"@antfu/ni": "^0.21.4",
|
|
51
|
+
"@types/debug": "^4.1.8",
|
|
52
|
+
"@typescript-eslint/eslint-plugin": "^5.59.9",
|
|
53
|
+
"bumpp": "^9.1.1",
|
|
54
|
+
"eslint": "^8.42.0",
|
|
55
55
|
"https-localhost": "^4.7.1",
|
|
56
|
-
"typescript": "^
|
|
57
|
-
"unbuild": "^1.
|
|
58
|
-
"vite": "^4.
|
|
59
|
-
"vite-plugin-pwa": "
|
|
60
|
-
"vitepress": "1.0.0-
|
|
56
|
+
"typescript": "^5.1.3",
|
|
57
|
+
"unbuild": "^1.2.1",
|
|
58
|
+
"vite": "^4.3.9",
|
|
59
|
+
"vite-plugin-pwa": ">=0.16.3 <1",
|
|
60
|
+
"vitepress": "1.0.0-beta.1"
|
|
61
61
|
},
|
|
62
62
|
"pnpm": {
|
|
63
63
|
"peerDependencyRules": {
|