Skip to content

Commit

Permalink
refactor: migrate to GitLab
Browse files Browse the repository at this point in the history
  • Loading branch information
DuCanhGH committed Mar 30, 2024
1 parent 8200bef commit 5726154
Show file tree
Hide file tree
Showing 23 changed files with 97 additions and 67 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/0-bug-next-pwa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ body:
- type: input
attributes:
label: Link to reproduction - Issues with a link to complete (but minimal) reproduction code help us address them faster
description: A link to a GitHub repository of a minimal reproduction. Minimal reproductions should be created from [our bug report template with `npx create-next-app -e https://github.com/DuCanhGH/next-pwa/tree/master/examples/reproduction-template`](https://github.com/DuCanhGH/next-pwa/tree/master/examples/reproduction-template) and should include only changes that contribute to the issue.
description: A link to a GitHub repository of a minimal reproduction. Minimal reproductions should be created from [our bug report template with `npx degit git@gitlab.com:serwist/next-pwa/tree/master/examples/reproduction-template`](https://gitlab.com/serwist/next-pwa/tree/master/examples/reproduction-template) and should include only changes that contribute to the issue.
validations:
required: true
- type: textarea
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Contributing to `next-pwa`

- Read about our [Code of Conduct](.//CODE_OF_CONDUCT.md).
- Before jumping into a PR be sure to search [existing PRs](https://github.com/DuCanhGH/next-pwa/pulls) or [issues](https://github.com/DuCanhGH/next-pwa/issues) for an item that is related to your submission.
- Before jumping into a PR be sure to search [existing PRs](https://gitlab.com/serwist/next-pwa/pulls) or [issues](https://gitlab.com/serwist/next-pwa/issues) for an item that is related to your submission.

## Repository

Expand Down
2 changes: 1 addition & 1 deletion contributing/core/adding-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Anyone can propose a change. However, adding new features often requires community discussions before proceeding with the implementation.

Therefore, before opening a PR, you should use the [Feature Request discussion template](https://github.com/DuCanhGH/next-pwa/discussions/new?category=ideas) and collect feedback.
Therefore, before opening a PR, you should [open a new issue](https://gitlab.com/serwist/next-pwa/issues/new) and collect feedback.

## Why use a discussion?

Expand Down
2 changes: 1 addition & 1 deletion contributing/core/developing.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ To develop locally:

1. Clone the `next-pwa` repository:
```bash
git clone https://github.com/DuCanhGH/next-pwa -- --depth=3000 --branch master --single-branch
git clone git@gitlab.com:serwist/next-pwa -- --depth=3000 --branch master --single-branch
```
1. Create a new branch:
```bash
Expand Down
2 changes: 1 addition & 1 deletion contributing/docs/adding-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ To develop locally:

1. Clone the `next-pwa` repository:
```bash
git clone https://github.com/DuCanhGH/next-pwa -- --depth=3000 --branch master --single-branch
git clone git@gitlab.com:serwist/next-pwa -- --depth=3000 --branch master --single-branch
```
1. Create a new branch:
```bash
Expand Down
14 changes: 7 additions & 7 deletions contributing/examples/adding-examples.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Adding examples

When you add an example to the [examples](https://github.com/DuCanhGH/next-pwa/tree/master/examples) directory, please follow these guidelines:
When you add an example to the [examples](https://gitlab.com/serwist/next-pwa/tree/master/examples) directory, please follow these guidelines:

- TypeScript should be leveraged for new examples.
- If API routes aren't used in an example, they should be omitted.
Expand All @@ -25,7 +25,7 @@ This example demonstrates how to use `next-pwa` with DESCRIPTION.

## Usage

[![Open in Gitpod and run](https://img.shields.io/badge/Open%20In-Gitpod.io-%231966D2?style=for-the-badge&logo=gitpod)](https://gitpod.io/#https://github.com/DuCanhGH/next-pwa/)
[![Open in Gitpod and run](https://img.shields.io/badge/Open%20In-Gitpod.io-%231966D2?style=for-the-badge&logo=gitpod)](https://gitpod.io/#https://gitlab.com/serwist/next-pwa/)

```bash
cd examples/DIRECTORY_NAME
Expand All @@ -35,22 +35,22 @@ pnpm start

or

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:
Execute [`degit`](https://github.com/Rich-Harris/degit) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), [pnpm](https://pnpm.io), or [bun](https://bun.sh) to bootstrap the example:

```bash
npx create-next-app --example https://github.com/DuCanhGH/next-pwa/tree/master/examples/DIRECTORY_NAME DIRECTORY_NAME-app
npx degit git@gitlab.com:serwist/next-pwa/tree/master/examples/DIRECTORY_NAME DIRECTORY_NAME-app
```

```bash
yarn create next-app --example https://github.com/DuCanhGH/next-pwa/tree/master/examples/DIRECTORY_NAME DIRECTORY_NAME-app
yarn degit git@gitlab.com:serwist/next-pwa/tree/master/examples/DIRECTORY_NAME DIRECTORY_NAME-app
```

```bash
pnpm create next-app --example https://github.com/DuCanhGH/next-pwa/tree/master/examples/DIRECTORY_NAME DIRECTORY_NAME-app
pnpx degit git@gitlab.com:serwist/next-pwa/tree/master/examples/DIRECTORY_NAME DIRECTORY_NAME-app
```

```bash
bun create next-app --example https://github.com/DuCanhGH/next-pwa/tree/master/examples/DIRECTORY_NAME DIRECTORY_NAME-app
bunx degit git@gitlab.com:serwist/next-pwa/tree/master/examples/DIRECTORY_NAME DIRECTORY_NAME-app
```

## Recommended `.gitignore`
Expand Down
2 changes: 1 addition & 1 deletion docs/content/next-pwa/configuring.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export default withPWA({

## Runtime caching

`next-pwa` has a default runtime caching array, see: [cache.ts](https://github.com/DuCanhGH/next-pwa/tree/master/packages/next-pwa/src/cache.ts)
`next-pwa` has a default runtime caching array, see: [cache.ts](https://gitlab.com/serwist/next-pwa/tree/master/packages/next-pwa/src/cache.ts)

If you want to have your own runtime caching rules, change your `next.config.js` like so:

Expand Down
4 changes: 2 additions & 2 deletions docs/content/next-pwa/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type: Docs
React](https://react.dev/learn), [learn
Next.js](https://nextjs.org/learn/basics/create-nextjs-app) and [Next.js
documentation](https://nextjs.org/docs) first, and then start from [a simple
example](https://github.com/DuCanhGH/next-pwa/tree/master/examples/basic).
example](https://gitlab.com/serwist/next-pwa/tree/master/examples/basic).
</Callout>

<Tabs>
Expand Down Expand Up @@ -381,7 +381,7 @@ export default function App({ Component, pageProps }: AppProps) {

## Tips

- [You may want to ask user to reload when a new service worker is installed](https://github.com/DuCanhGH/next-pwa/tree/master/examples/lifecycle/components/PWALifecycle.tsx#L20-L40)
- [You may want to ask user to reload when a new service worker is installed](https://gitlab.com/serwist/next-pwa/tree/master/examples/lifecycle/components/PWALifecycle.tsx#L20-L40)

- When you are debugging the service worker, remember to constantly clean the application cache to reduce some flaky errors.

Expand Down
2 changes: 1 addition & 1 deletion docs/content/next-pwa/offline-fallbacks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Sometimes fetching from both the cache and the network fails, in which case a re

To enable this behavior for pages, simply add a `/_offline.tsx` file to `pages/` or a `/~offline/page.tsx` file to `app/`. You are all set!
When the user is offline, all pages that are not cached will fallback to `/_offline` (or `/~offline` if you are using App Router).
[You can use this example to see it in action.](https://github.com/DuCanhGH/next-pwa/tree/master/examples/offline-fallback-v2)
[You can use this example to see it in action.](https://gitlab.com/serwist/next-pwa/tree/master/examples/offline-fallback-v2)

To also add a fallback for other resources, change your `next.config.js` like so:

Expand Down
4 changes: 2 additions & 2 deletions docs/src/app/(home)/code-showcase.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ module.exports = withPWA({
There are just [so many options](/docs/next-pwa/configuring) thanks to Workbox's extensive API 🤯 You can disable the plugin, change how it caches stuff
at runtime, silent its logging, add your custom code to the service worker or even write the service worker yourself!

We are working hard to add useful features to the plugin! You can help by [contributing to the repository](https://github.com/DuCanhGH/next-pwa/tree/master/contributing)
or [creating feature requests](https://github.com/DuCanhGH/next-pwa/issues/new/choose)!
We are working hard to add useful features to the plugin! You can help by [contributing to the repository](https://gitlab.com/serwist/next-pwa/tree/master/contributing)
or [creating feature requests](https://gitlab.com/serwist/next-pwa/issues/new/choose)!

</CodeShowcase>
2 changes: 1 addition & 1 deletion docs/src/app/(home)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const Page = async () => {
>
Get started
</Link>
<InlineCode>npx create-next-app@latest -e https://github.com/DuCanhGH/next-pwa/tree/master/examples/basic</InlineCode>
<InlineCode>npx degit git@gitlab.com:serwist/next-pwa/tree/master/examples/basic</InlineCode>
</div>
<div className="w-full p-4 md:p-24">
<div className="grid w-full text-left lg:mb-0 lg:grid-cols-4 lg:gap-2">
Expand Down
2 changes: 1 addition & 1 deletion docs/src/shared/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const DOCS_DOMAIN = "https://ducanh-next-pwa.vercel.app";

export const GITHUB_REPO_URL = "https://github.com/DuCanhGH/next-pwa";
export const GITHUB_REPO_URL = "https://gitlab.com/serwist/next-pwa";

export const AVAILABLE_COLOR_SCHEMES = ["dark", "light"] as const;
14 changes: 9 additions & 5 deletions examples/basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This example demonstrates how to use `next-pwa`.

## Usage

[![Open in Gitpod and run](https://img.shields.io/badge/Open%20In-Gitpod.io-%231966D2?style=for-the-badge&logo=gitpod)](https://gitpod.io/#https://github.com/DuCanhGH/next-pwa/)
[![Open in Gitpod and run](https://img.shields.io/badge/Open%20In-Gitpod.io-%231966D2?style=for-the-badge&logo=gitpod)](https://gitpod.io/#https://gitlab.com/serwist/next-pwa/)

```bash
cd examples/basic
Expand All @@ -14,18 +14,22 @@ pnpm start

or

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:
Execute [`degit`](https://github.com/Rich-Harris/degit) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), [pnpm](https://pnpm.io), or [bun](https://bun.sh) to bootstrap the example:

```bash
npx create-next-app --example https://github.com/DuCanhGH/next-pwa/tree/master/examples/basic basic-app
npx degit git@gitlab.com:serwist/next-pwa/tree/master/examples/basic basic-app
```

```bash
yarn create next-app --example https://github.com/DuCanhGH/next-pwa/tree/master/examples/basic basic-app
yarn degit git@gitlab.com:serwist/next-pwa/tree/master/examples/basic basic-app
```

```bash
pnpm create next-app --example https://github.com/DuCanhGH/next-pwa/tree/master/examples/basic basic-app
pnpx degit git@gitlab.com:serwist/next-pwa/tree/master/examples/basic basic-app
```

```bash
bunx degit git@gitlab.com:serwist/next-pwa/tree/master/examples/basic basic-app
```

## Recommended `.gitignore`
Expand Down
14 changes: 9 additions & 5 deletions examples/custom-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ It is still recommended to use Next's built-in server instead.

## Usage

[![Open in Gitpod and run](https://img.shields.io/badge/Open%20In-Gitpod.io-%231966D2?style=for-the-badge&logo=gitpod)](https://gitpod.io/#https://github.com/DuCanhGH/next-pwa/)
[![Open in Gitpod and run](https://img.shields.io/badge/Open%20In-Gitpod.io-%231966D2?style=for-the-badge&logo=gitpod)](https://gitpod.io/#https://gitlab.com/serwist/next-pwa/)

```bash
cd examples/custom-server
Expand All @@ -20,18 +20,22 @@ pnpm start

or

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:
Execute [`degit`](https://github.com/Rich-Harris/degit) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), [pnpm](https://pnpm.io), or [bun](https://bun.sh) to bootstrap the example:

```bash
npx create-next-app --example https://github.com/DuCanhGH/next-pwa/tree/master/examples/custom-server custom-server-app
npx degit git@gitlab.com:serwist/next-pwa/tree/master/examples/custom-server custom-server-app
```

```bash
yarn create next-app --example https://github.com/DuCanhGH/next-pwa/tree/master/examples/custom-server custom-server-app
yarn degit git@gitlab.com:serwist/next-pwa/tree/master/examples/custom-server custom-server-app
```

```bash
pnpm create next-app --example https://github.com/DuCanhGH/next-pwa/tree/master/examples/custom-server custom-server-app
pnpx degit git@gitlab.com:serwist/next-pwa/tree/master/examples/custom-server custom-server-app
```

```bash
bunx degit git@gitlab.com:serwist/next-pwa/tree/master/examples/custom-server custom-server-app
```

## Recommended `.gitignore`
Expand Down
14 changes: 9 additions & 5 deletions examples/custom-worker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This example demonstrates how to add some custom worker code to the generated se

## Usage

[![Open in Gitpod and run](https://img.shields.io/badge/Open%20In-Gitpod.io-%231966D2?style=for-the-badge&logo=gitpod)](https://gitpod.io/#https://github.com/DuCanhGH/next-pwa/)
[![Open in Gitpod and run](https://img.shields.io/badge/Open%20In-Gitpod.io-%231966D2?style=for-the-badge&logo=gitpod)](https://gitpod.io/#https://gitlab.com/serwist/next-pwa/)

```bash
cd examples/custom-worker
Expand All @@ -14,18 +14,22 @@ pnpm start

or

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:
Execute [`degit`](https://github.com/Rich-Harris/degit) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), [pnpm](https://pnpm.io), or [bun](https://bun.sh) to bootstrap the example:

```bash
npx create-next-app --example https://github.com/DuCanhGH/next-pwa/tree/master/examples/custom-worker custom-worker-app
npx degit git@gitlab.com:serwist/tree/master/examples/custom-worker custom-worker-app
```

```bash
yarn create next-app --example https://github.com/DuCanhGH/next-pwa/tree/master/examples/custom-worker custom-worker-app
yarn degit git@gitlab.com:serwist/tree/master/examples/custom-worker custom-worker-app
```

```bash
pnpm create next-app --example https://github.com/DuCanhGH/next-pwa/tree/master/examples/custom-worker custom-worker-app
pnpx degit git@gitlab.com:serwist/next-pwa/tree/master/examples/custom-worker custom-worker-app
```

```bash
bunx degit git@gitlab.com:serwist/next-pwa/tree/master/examples/custom-worker custom-worker-app
```

## Recommended `.gitignore`
Expand Down
14 changes: 9 additions & 5 deletions examples/lifecycle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This example also demonstrates how to [prompt the user to reload the page when a

## Usage

[![Open in Gitpod and run](https://img.shields.io/badge/Open%20In-Gitpod.io-%231966D2?style=for-the-badge&logo=gitpod)](https://gitpod.io/#https://github.com/DuCanhGH/next-pwa/)
[![Open in Gitpod and run](https://img.shields.io/badge/Open%20In-Gitpod.io-%231966D2?style=for-the-badge&logo=gitpod)](https://gitpod.io/#https://gitlab.com/serwist/next-pwa/)

```bash
cd examples/lifecycle
Expand All @@ -16,18 +16,22 @@ pnpm start

or

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:
Execute [`degit`](https://github.com/Rich-Harris/degit) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), [pnpm](https://pnpm.io), or [bun](https://bun.sh) to bootstrap the example:

```bash
npx create-next-app --example https://github.com/DuCanhGH/next-pwa/tree/master/examples/lifecycle lifecycle-app
npx degit git@gitlab.com:serwist/next-pwa/tree/master/examples/lifecycle lifecycle-app
```

```bash
yarn create next-app --example https://github.com/DuCanhGH/next-pwa/tree/master/examples/lifecycle lifecycle-app
yarn degit git@gitlab.com:serwist/next-pwa/tree/master/examples/lifecycle lifecycle-app
```

```bash
pnpm create next-app --example https://github.com/DuCanhGH/next-pwa/tree/master/examples/lifecycle lifecycle-app
pnpx degit git@gitlab.com:serwist/next-pwa/tree/master/examples/lifecycle lifecycle-app
```

```bash
bunx degit git@gitlab.com:serwist/next-pwa/tree/master/examples/lifecycle lifecycle-app
```

## Recommended `.gitignore`
Expand Down
14 changes: 9 additions & 5 deletions examples/next-i18next/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This example demonstrates how to use [`next-i18next`](https://github.com/i18next

## Usage

[![Open in Gitpod and run](https://img.shields.io/badge/Open%20In-Gitpod.io-%231966D2?style=for-the-badge&logo=gitpod)](https://gitpod.io/#https://github.com/DuCanhGH/next-pwa/)
[![Open in Gitpod and run](https://img.shields.io/badge/Open%20In-Gitpod.io-%231966D2?style=for-the-badge&logo=gitpod)](https://gitpod.io/#https://gitlab.com/serwist/next-pwa/)

```bash
cd examples/next-i18next
Expand All @@ -16,18 +16,22 @@ pnpm start

or

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:
Execute [`degit`](https://github.com/Rich-Harris/degit) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), [pnpm](https://pnpm.io), or [bun](https://bun.sh) to bootstrap the example:

```bash
npx create-next-app --example https://github.com/DuCanhGH/next-pwa/tree/master/examples/next-i18next next-i18next-app
npx degit git@gitlab.com:serwist/next-pwa/tree/master/examples/next-i18next next-i18next-app
```

```bash
yarn create next-app --example https://github.com/DuCanhGH/next-pwa/tree/master/examples/next-i18next next-i18next-app
yarn degit git@gitlab.com:serwist/next-pwa/tree/master/examples/next-i18next next-i18next-app
```

```bash
pnpm create next-app --example https://github.com/DuCanhGH/next-pwa/tree/master/examples/next-i18next next-i18next-app
pnpx degit git@gitlab.com:serwist/next-pwa/tree/master/examples/next-i18next next-i18next-app
```

```bash
bunx degit git@gitlab.com:serwist/next-pwa/tree/master/examples/next-i18next next-i18next-app
```

Then try out following paths:
Expand Down
14 changes: 9 additions & 5 deletions examples/next-image/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ For best performance, put images in its own folder rather than `public`. This wi

## Usage

[![Open in Gitpod and run](https://img.shields.io/badge/Open%20In-Gitpod.io-%231966D2?style=for-the-badge&logo=gitpod)](https://gitpod.io/#https://github.com/DuCanhGH/next-pwa/)
[![Open in Gitpod and run](https://img.shields.io/badge/Open%20In-Gitpod.io-%231966D2?style=for-the-badge&logo=gitpod)](https://gitpod.io/#https://gitlab.com/serwist/next-pwa/)

```bash
cd examples/next-image
Expand All @@ -16,18 +16,22 @@ pnpm start

or

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:
Execute [`degit`](https://github.com/Rich-Harris/degit) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), [pnpm](https://pnpm.io), or [bun](https://bun.sh) to bootstrap the example:

```bash
npx create-next-app --example https://github.com/DuCanhGH/next-pwa/tree/master/examples/next-image next-image-app
npx degit git@gitlab.com:serwist/next-pwa/tree/master/examples/next-image next-image-app
```

```bash
yarn create next-app --example https://github.com/DuCanhGH/next-pwa/tree/master/examples/next-image next-image-app
yarn degit git@gitlab.com:serwist/next-pwa/tree/master/examples/next-image next-image-app
```

```bash
pnpm create next-app --example https://github.com/DuCanhGH/next-pwa/tree/master/examples/next-image next-image-app
pnpx degit git@gitlab.com:serwist/next-pwa/tree/master/examples/next-image next-image-app
```

```bash
bunx degit git@gitlab.com:serwist/next-pwa/tree/master/examples/next-image next-image-app
```

## Recommended `.gitignore`
Expand Down
Loading

0 comments on commit 5726154

Please sign in to comment.