Skip to content
This repository was archived by the owner on Oct 9, 2024. It is now read-only.

Commit 207767f

Browse files
committed
v2.2.2
1 parent a2ac7ab commit 207767f

13 files changed

+52
-42
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# 🛠️ CHANGELOG
22

3+
## 2.2.2
4+
5+
- Updated `app/layout.tsx` to use suspense boundaries.
6+
7+
- `printer layout` now uses a suspense boundary.
8+
9+
- `printer loading` now uses a suspense boundary.
10+
311
## 2.2.1
412

513
- In `printer new`, forgot to add `components/counter.tsx` to build list.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
## Automation Tooling for Next, Redux and Prisma
66

77
![license](https://img.shields.io/badge/license-AGPLv3-blue.svg)
8-
![version](https://img.shields.io/badge/version-2.2.1-blue.svg)
8+
![version](https://img.shields.io/badge/version-2.2.2-blue.svg)
99
[![CircleCI](https://circleci.com/gh/PrinterFramework/CLI.svg?style=svg)](https://circleci.com/gh/PrinterFramework/CLI)
1010

1111
**Printer v1.x.x** is compatible with the old Next patterns. You can review the documentation on the v1 website: [v1.prntr.click/docs](https://v1.prntr.click/docs)

dist/src/printer.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/templates/layout.template

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import { Metadata } from 'next'
2-
import { ReactNode } from 'react'
1+
import { ReactNode, Suspense } from 'react'
32

4-
export const metadata: Metadata = {
3+
export const metadata = {
54

65
}
76

@@ -11,8 +10,8 @@ export interface LayoutI {
1110

1211
export default function LayoutComponent({ children }: LayoutI) {
1312
return (
14-
<div>
13+
<Suspense>
1514
{children}
16-
</div>
15+
</Suspense>
1716
)
1817
}

dist/src/templates/loading.template

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
import { Suspense } from 'react'
2+
13
export default function LoadingComponent() {
24
return (
3-
<div className="container page center loading-page">
4-
<p>Please wait... Loading...</p>
5-
</div>
5+
<Suspense>
6+
<p>Loading...</p>
7+
</Suspense>
68
)
79
}
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
import 'scss/printer.scss'
2-
import { ReactNode } from 'react'
2+
import { ReactNode, Suspense } from 'react'
33
import { ReduxProvider } from 'redux/provider'
44

5+
export const metadata = {
6+
title: 'Printer',
7+
description: 'Automation Tooling for Next, Redux and Prisma'
8+
}
9+
510
export interface LayoutI {
611
children: ReactNode
712
}
813

914
export default function RootLayout({ children }: LayoutI) {
1015
return (
1116
<ReduxProvider>
12-
<html lang="en">
13-
<body>
14-
{children}
15-
</body>
16-
</html>
17+
<Suspense>
18+
<html lang="en">
19+
<body>{children}</body>
20+
</html>
21+
</Suspense>
1722
</ReduxProvider>
1823
)
1924
}
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
import Counter from 'components/counter'
22

3-
export const metadata = {
4-
title: 'Printer',
5-
description: 'Automation Tooling for Next, Redux and Prisma'
6-
}
7-
83
export default function RootPage() {
94
return <Counter />
105
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@printerframework/cli",
33
"description": "🖨️ Automation Tooling for Next, Redux and Prisma.",
4-
"version": "2.2.1",
4+
"version": "2.2.2",
55
"private": false,
66
"preferGlobal": true,
77
"repository": "https://github.com/PrinterFramework/CLI.git",

src/printer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { SuperagentTypes, injectSupergent } from './generators/superagent'
2020
export const Printer = new Command('🖨️ Printer')
2121

2222
Printer
23-
.version('2.2.1')
23+
.version('2.2.2')
2424
.description('🖨️ Printer: Automation Tooling for Next, Redux and Prisma.')
2525
.option('-a, --no-action', 'do not inject actions', false)
2626
.option('-s, --no-state', 'do not inject state', false)

src/templates/layout.template

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import { Metadata } from 'next'
2-
import { ReactNode } from 'react'
1+
import { ReactNode, Suspense } from 'react'
32

4-
export const metadata: Metadata = {
3+
export const metadata = {
54

65
}
76

@@ -11,8 +10,8 @@ export interface LayoutI {
1110

1211
export default function LayoutComponent({ children }: LayoutI) {
1312
return (
14-
<div>
13+
<Suspense>
1514
{children}
16-
</div>
15+
</Suspense>
1716
)
1817
}

src/templates/loading.template

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
import { Suspense } from 'react'
2+
13
export default function LoadingComponent() {
24
return (
3-
<div className="container page center loading-page">
4-
<p>Please wait... Loading...</p>
5-
</div>
5+
<Suspense>
6+
<p>Loading...</p>
7+
</Suspense>
68
)
79
}
+11-6
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
import 'scss/printer.scss'
2-
import { ReactNode } from 'react'
2+
import { ReactNode, Suspense } from 'react'
33
import { ReduxProvider } from 'redux/provider'
44

5+
export const metadata = {
6+
title: 'Printer',
7+
description: 'Automation Tooling for Next, Redux and Prisma'
8+
}
9+
510
export interface LayoutI {
611
children: ReactNode
712
}
813

914
export default function RootLayout({ children }: LayoutI) {
1015
return (
1116
<ReduxProvider>
12-
<html lang="en">
13-
<body>
14-
{children}
15-
</body>
16-
</html>
17+
<Suspense>
18+
<html lang="en">
19+
<body>{children}</body>
20+
</html>
21+
</Suspense>
1722
</ReduxProvider>
1823
)
1924
}
-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
import Counter from 'components/counter'
22

3-
export const metadata = {
4-
title: 'Printer',
5-
description: 'Automation Tooling for Next, Redux and Prisma'
6-
}
7-
83
export default function RootPage() {
94
return <Counter />
105
}

0 commit comments

Comments
 (0)