More re-brand, add config
This commit is contained in:
parent
1203c36497
commit
74a190784e
3
.env
Normal file
3
.env
Normal file
@ -0,0 +1,3 @@
|
||||
CERC_TEST_WEBAPP_CONFIG1="this string"
|
||||
CERC_TEST_WEBAPP_CONFIG2="this different string"
|
||||
CERC_WEBAPP_DEBUG=0
|
22
README.md
22
README.md
@ -1,23 +1,7 @@
|
||||
# Progressive Web App Example
|
||||
# Test Progressive Web App
|
||||
|
||||
This example uses [`next-pwa`](https://github.com/shadowwalker/next-pwa) to create a progressive web app (PWA) powered by [Workbox](https://developers.google.com/web/tools/workbox/).
|
||||
This example used [`next-pwa`](https://github.com/shadowwalker/next-pwa) to create a progressive web app (PWA) powered by [Workbox](https://developers.google.com/web/tools/workbox/).
|
||||
|
||||
## Deploy your own
|
||||
|
||||
Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example):
|
||||
|
||||
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vercel/next.js/tree/canary/examples/progressive-web-app&project-name=progressive-web-app&repository-name=progressive-web-app)
|
||||
|
||||
## How to use
|
||||
|
||||
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:
|
||||
|
||||
```bash
|
||||
npx create-next-app --example progressive-web-app progressive-web-app
|
||||
# or
|
||||
yarn create next-app --example progressive-web-app progressive-web-app
|
||||
# or
|
||||
pnpm create next-app --example progressive-web-app progressive-web-app
|
||||
```
|
||||
|
||||
Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
|
||||
(Under construction)
|
||||
|
@ -4,5 +4,9 @@ const withPWA = require('next-pwa')({
|
||||
})
|
||||
|
||||
module.exports = withPWA({
|
||||
// config
|
||||
env: {
|
||||
CERC_TEST_WEBAPP_CONFIG1: process.env.CERC_TEST_WEBAPP_CONFIG1,
|
||||
CERC_TEST_WEBAPP_CONFIG2: process.env.CERC_TEST_WEBAPP_CONFIG2,
|
||||
CERC_WEBAPP_DEBUG: process.env.CERC_WEBAPP_DEBUG,
|
||||
},
|
||||
})
|
||||
|
@ -14,7 +14,7 @@ export default function MyApp({ Component, pageProps }: AppProps) {
|
||||
/>
|
||||
<meta name="description" content="Description" />
|
||||
<meta name="keywords" content="Keywords" />
|
||||
<title>Next.js PWA Example</title>
|
||||
<title>Laconic Test PWA</title>
|
||||
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<link
|
||||
|
@ -9,7 +9,21 @@ export default function Home() {
|
||||
</h1>
|
||||
|
||||
<div className={styles.grid}>
|
||||
|
||||
<p className={styles.card}>
|
||||
CONFIG1 has value: {process.env.CERC_TEST_WEBAPP_CONFIG1}
|
||||
</p>
|
||||
|
||||
<p className={styles.card}>
|
||||
CONFIG2 has value: {process.env.CERC_TEST_WEBAPP_CONFIG2}
|
||||
</p>
|
||||
|
||||
<p className={styles.card}>
|
||||
WEBAPP_DEBUG has value: {process.env.CERC_WEBAPP_DEBUG}
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</main>
|
||||
|
||||
<footer className={styles.footer}>
|
||||
@ -24,7 +38,7 @@ export default function Home() {
|
||||
d="M37.761 22.302h9.246v-2.704h-6.155v-17.9h-3.09v20.604ZM59.314 1.697h-5.126l-5.357 20.605h3.194l1.34-5.151h6.618l1.34 5.151h3.348L59.314 1.697Zm-5.306 12.878 2.679-10.663h.103l2.575 10.663h-5.357ZM74.337 9.682h3.606c0-5.873-1.88-8.397-6.259-8.397-4.61 0-6.593 3.194-6.593 10.689 0 7.52 1.983 10.74 6.593 10.74 4.379 0 6.259-2.447 6.285-8.139h-3.606c-.026 4.456-.567 5.563-2.679 5.563-2.42 0-3.013-1.622-2.987-8.164 0-6.516.592-8.14 2.987-8.113 2.112 0 2.653 1.159 2.653 5.82ZM86.689 1.285c4.687.026 6.696 3.245 6.696 10.715 0 7.469-2.009 10.688-6.696 10.714-4.714.026-6.723-3.194-6.723-10.714 0-7.521 2.01-10.74 6.723-10.715ZM83.572 12c0 6.516.618 8.139 3.117 8.139 2.472 0 3.09-1.623 3.09-8.14 0-6.541-.618-8.164-3.09-8.138-2.499.026-3.117 1.648-3.117 8.139ZM99.317 22.276l-3.09.026V1.697h5.434l5.074 16.793h.052V1.697h3.09v20.605h-5.099l-5.409-18.08h-.052v18.054ZM116.615 1.697h-3.091v20.605h3.091V1.697ZM128.652 9.682h3.606c0-5.873-1.881-8.397-6.259-8.397-4.61 0-6.594 3.194-6.594 10.689 0 7.52 1.984 10.74 6.594 10.74 4.378 0 6.259-2.447 6.284-8.139h-3.605c-.026 4.456-.567 5.563-2.679 5.563-2.421 0-3.014-1.622-2.988-8.164 0-6.516.593-8.14 2.988-8.113 2.112 0 2.653 1.159 2.653 5.82Z"
|
||||
fill="#000000">
|
||||
</path>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
<path fillRule="evenodd" clipRule="evenodd"
|
||||
d="M4.05 12.623A15.378 15.378 0 0 0 8.57 1.714C8.573 1.136 8.54.564 8.477 0H0v16.287c0 1.974.752 3.949 2.258 5.454A7.69 7.69 0 0 0 7.714 24L24 24v-8.477a15.636 15.636 0 0 0-1.715-.095c-4.258 0-8.115 1.73-10.908 4.523-2.032 1.981-5.291 1.982-7.299-.026-2.006-2.006-2.007-5.266-.029-7.302Zm18.192-10.86a6.004 6.004 0 0 0-8.485 0 6.003 6.003 0 0 0 0 8.484 6.003 6.003 0 0 0 8.485 0 6.002 6.002 0 0 0 0-8.485Z"
|
||||
fill="#000000">
|
||||
</path>
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Next.JS Progressive Web App",
|
||||
"short_name": "Next PWA",
|
||||
"name": "Laconic Test Progressive Web App",
|
||||
"short_name": "Test PWA",
|
||||
"theme_color": "#ffffff",
|
||||
"background_color": "#004740",
|
||||
"display": "fullscreen",
|
||||
|
Loading…
Reference in New Issue
Block a user