-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
5,155 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
build/ | ||
dist/ | ||
dev-dist/ | ||
node_modules/ | ||
*.svelte | ||
*.d.ts | ||
!.vitepress/dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"extends": ["@antfu"], | ||
"overrides": [ | ||
{ | ||
"files": [ | ||
"**/*.md/*.*" | ||
], | ||
"rules": { | ||
"@typescript-eslint/no-this-alias": "off", | ||
"n/handle-callback-err": "off", | ||
"no-restricted-syntax": "off", | ||
"no-labels": "off" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
node_modules | ||
.DS_Store | ||
dist | ||
dev-dist | ||
# intellij stuff | ||
.idea/ | ||
# routify | ||
.routify/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ignore-workspace-root-check=true | ||
shamefully-hoist=true | ||
strict-peer-dependencies=false | ||
auto-install-peers=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Contributing Guide | ||
|
||
Hi! We are really excited that you are interested in contributing to `vite-plugin-pwa`. Before submitting your contribution, please make sure to take a moment and read through the following guide. | ||
|
||
Refer also to https://github.com/antfu/contribute. | ||
## Set up your local development environment | ||
|
||
The `vite-plugin-pwa` repo is a monorepo using pnpm workspaces. The package manager used to install and link dependencies must be [pnpm](https://pnpm.io/). | ||
|
||
To develop and test the `vite-plugin-pwa` package: | ||
|
||
1. Fork the `vite-plugin-pwa` repository to your own GitHub account and then clone it to your local device. | ||
|
||
2. Ensure using the latest Node.js (16.x) | ||
|
||
3. `vite-plugin-pwa` uses pnpm v7. If you are working on multiple projects with different versions of pnpm, it's recommend to enable [Corepack](https://github.com/nodejs/corepack) by running `corepack enable`. | ||
|
||
4. Check out a branch where you can work and commit your changes: | ||
```shell | ||
git checkout -b my-new-branch | ||
``` | ||
|
||
5. Run `pnpm i` in `vite-plugin-pwa`'s root folder | ||
|
||
6. Run `pnpm run build` in `vite-plugin-pwa`'s root folder. | ||
|
||
## Testing changes | ||
|
||
The `vite-plugin-pwa` repo includes a set of examples where you can test the changes (you can find them on examples folder), you should check your changes against each framework using the `cli` for running examples: | ||
- `pnpm run examples`: select `vue` framework and default options on the cli (you can also test another options) | ||
- `pnpm run examples`: select `react` framework and default options on the cli (you can also test another options) | ||
- `pnpm run examples`: select `preact` framework and default options on the cli (you can also test another options) | ||
- `pnpm run examples`: select `svelte` framework and default options on the cli (you can also test another options) | ||
- `pnpm run examples`: select `sveltekit` framework and default options on the cli (you can also test another options) | ||
- `pnpm run examples`: select `solid` framework and default options on the cli (you can also test another options) | ||
|
||
> The default options from the `cli` are just to check your changes are not breaking major ui/app frameworks build: `generateSW` strategy, `Prompt for update` behavior and `Enable periodic SW updates` to `no`. | ||
> If your changes are specific to some behavior, just use the corresponding option on the `cli`. | ||
## Testing website docs changes | ||
|
||
`vite-plugin-pwa` uses `Vitepress` for the website docs, if your changes are about the documentation, you can find the website on the `docs` folder. | ||
|
||
Once you made the changes to the documentation, you can test them running `pnpm run docs` from the root folder. | ||
|
||
To check the website build, just run `pnpm run docs:serve` from the root folder. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { defineBuildConfig } from 'unbuild' | ||
|
||
export default defineBuildConfig({ | ||
entries: [ | ||
'src/index', | ||
], | ||
clean: true, | ||
declaration: true, | ||
externals: [ | ||
'vite', | ||
'rollup', | ||
'workbox-build', | ||
], | ||
rollup: { | ||
emitCJS: false, | ||
dts: { | ||
respectExternal: true, | ||
}, | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
"name": "@vite-pwa/sveltekit", | ||
"version": "0.12.7", | ||
"type": "module", | ||
"packageManager": "[email protected]", | ||
"description": "Zero-config PWA for SvelteKit", | ||
"author": "antfu <[email protected]>", | ||
"license": "MIT", | ||
"funding": "https://github.com/sponsors/antfu", | ||
"homepage": "https://github.com/antfu/vite-plugin-pwa", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/vite-pwa/sveltekit" | ||
}, | ||
"bugs": "https://github.com/vite-pwa/sveltekit/issues", | ||
"keywords": [ | ||
"sveltekit", | ||
"workbox", | ||
"vite", | ||
"vite-plugin" | ||
], | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.mjs" | ||
} | ||
}, | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "unbuild", | ||
"lint": "eslint .", | ||
"lint-fix": "nr lint --fix", | ||
"prepublishOnly": "npm run build", | ||
"release": "npx bumpp --push --tag --commit && npm publish", | ||
"examples": "esno scripts/run-examples.ts" | ||
}, | ||
"peerDependencies": { | ||
"vite-plugin-pwa": "^0.12.7" | ||
}, | ||
"devDependencies": { | ||
"@antfu/eslint-config": "^0.26.3", | ||
"@antfu/ni": "^0.18.0", | ||
"@types/debug": "^4.1.7", | ||
"@types/node": "^18.7.15", | ||
"@types/prompts": "^2.4.0", | ||
"@types/workbox-build": "^5.0.1", | ||
"@typescript-eslint/eslint-plugin": "^5.36.2", | ||
"eslint": "^8.23.0", | ||
"kolorist": "^1.5.1", | ||
"prompts": "^2.4.2", | ||
"svelte": "^3.50.0", | ||
"typescript": "^4.8.2", | ||
"unbuild": "^0.8.10", | ||
"vite": "^3.1.0", | ||
"vite-plugin-pwa": "file:vite-plugin-pwa-0.12.7.tgz", | ||
"workbox-window": "^6.5.4" | ||
}, | ||
"engines": { | ||
"node": ">=16.14" | ||
} | ||
} |
Oops, something went wrong.