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

Commit a2ac7ab

Browse files
committed
v2.2.1
1 parent 52ad604 commit a2ac7ab

File tree

10 files changed

+53
-13
lines changed

10 files changed

+53
-13
lines changed

CHANGELOG.md

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

3+
## 2.2.1
4+
5+
- In `printer new`, forgot to add `components/counter.tsx` to build list.
6+
7+
- Make sure example redux slice `reset()` works as intended with 13.5.3.
8+
39
## 2.2.0
410

511
- Relationships fixed for prisma

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.0-blue.svg)
8+
![version](https://img.shields.io/badge/version-2.2.1-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/generators/new.js

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

dist/src/generators/new.js.map

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

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/new/redux/slice/counter.tsx.template

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const counterSlice = createSlice({
1414
reducers: {
1515
// @printer::inject
1616
reset: (state) => {
17-
state = counterInitialState
17+
state.data.value = 0
1818
},
1919
// @printer::inject
2020
increment: (state, action: PayloadAction<number>) => {

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.0",
4+
"version": "2.2.1",
55
"private": false,
66
"preferGlobal": true,
77
"repository": "https://github.com/PrinterFramework/CLI.git",

src/generators/new.ts

+15
Original file line numberDiff line numberDiff line change
@@ -143,4 +143,19 @@ export async function generateNewProject (path: string = '.') {
143143
)
144144
Log(` ✅ Created app/${item}`.green)
145145
}
146+
147+
const components = [
148+
'counter.tsx'
149+
]
150+
151+
for (const item of components) {
152+
const itemPath = join(process.cwd(), path, 'components', item)
153+
const contents = read(join(__dirname, '..', 'templates', 'new', 'components', `${item}.template`)) || ''
154+
155+
write(
156+
itemPath,
157+
contents
158+
)
159+
Log(` ✅ Created components/${item}`.green)
160+
}
146161
}

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.0')
23+
.version('2.2.1')
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/new/redux/slice/counter.tsx.template

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const counterSlice = createSlice({
1414
reducers: {
1515
// @printer::inject
1616
reset: (state) => {
17-
state = counterInitialState
17+
state.data.value = 0
1818
},
1919
// @printer::inject
2020
increment: (state, action: PayloadAction<number>) => {

0 commit comments

Comments
 (0)