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

Commit

Permalink
v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisCates committed Jul 24, 2022
1 parent 24ddf9b commit 95c5166
Show file tree
Hide file tree
Showing 20 changed files with 36 additions and 94 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# 🛠️ CHANGELOG

## v1.1.0

- Made sure component generation checks both types of component structures for overwrite confirmation

- Updated Component namespaces for better formatted code completion

- Made sure that SCSS dynamically reloads with website

- Updated scss command to compile static CSS for SSG/SSR

## v1.0.0

#### Official API starts with the spec
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## Automation Tooling for Next, Redux and Prisma

![license](https://img.shields.io/badge/license-AGPLv3-blue.svg)
![version](https://img.shields.io/badge/version-1.0.0-blue.svg)
![version](https://img.shields.io/badge/version-1.1.0-blue.svg)
[![CircleCI](https://circleci.com/gh/PrinterFramework/CLI.svg?style=svg)](https://circleci.com/gh/PrinterFramework/CLI)
[![codecov](https://codecov.io/gh/PrinterFramework/CLI/branch/master/graph/badge.svg)](https://codecov.io/gh/PrinterFramework/CLI)

Expand Down
2 changes: 1 addition & 1 deletion dist/src/generators/component.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/src/generators/component.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/src/helpers/match.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/src/printer.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/src/templates/component/component.nostyle.template
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export interface {{name}}I {}

export function {{name}}Component({}: {{name}}I) {
export function {{name}}({}: {{name}}I) {
return (
<div>
<h2>Component {{name}}</h2>
</div>
)
}

export default {{name}}Component
export default {{name}}
4 changes: 3 additions & 1 deletion dist/src/templates/component/component.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import { {{name}}Style } from '{{path}}/{{prefix}}.style'

export interface {{name}}I {}

export function {{name}}Component({}: {{name}}I) {
export function {{name}}({}: {{name}}I) {
return (
<{{name}}Style>
<h2>Component {{name}}</h2>
</{{name}}Style>
)
}

export default {{name}}
1 change: 1 addition & 0 deletions dist/src/templates/new/_app.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'public/assets/scss/printer.scss'
import App, { AppContext, AppInitialProps } from 'next/app'
import { wrapper } from 'redux/wrapper'

Expand Down
2 changes: 1 addition & 1 deletion dist/src/templates/new/package.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "next start",
"prepare": "husky install",
"lint": "eslint . --ext ts,tsx --resolve-plugins-relative-to .",
"scss": "node-sass --output-style compact -rw public/assets/scss/printer.scss -o public/assets/css",
"scss": "node-sass --output-style compact -r public/assets/scss/printer.scss -o public/assets/css",
"prisma": "npx prisma generate && npx prisma db push"
},
"dependencies": {
Expand Down
3 changes: 2 additions & 1 deletion dist/src/templates/new/precommit.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint
npm run lint --fix
npm run scss
npm run build
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@printerframework/cli",
"description": "🖨️ Automation Tooling for Next, Redux and Prisma.",
"version": "1.0.0",
"version": "1.1.0",
"private": false,
"preferGlobal": true,
"repository": "https://github.com/PrinterFramework/CLI.git",
Expand Down
2 changes: 1 addition & 1 deletion src/generators/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Log } from '../helpers/log'
import { Config } from '../config'

export async function generateComponent (path: string) {
if (exists(join(process.cwd(), path)) !== false) {
if (exists(join(process.cwd(), path)) || exists(join(process.cwd(), `${path}.tsx`))) {
const result = await prompts({
type: 'confirm',
name: 'overwrite',
Expand Down
2 changes: 1 addition & 1 deletion src/printer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { inject } from './generators/inject'
export const Printer = new Command('🖨️ Printer')

Printer
.version('1.0.0')
.version('1.1.0')
.description('🖨️ Printer: Automation Tooling for Next, Redux and Prisma.')

Printer
Expand Down
4 changes: 2 additions & 2 deletions src/templates/component/component.nostyle.template
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export interface {{name}}I {}

export function {{name}}Component({}: {{name}}I) {
export function {{name}}({}: {{name}}I) {
return (
<div>
<h2>Component {{name}}</h2>
</div>
)
}

export default {{name}}Component
export default {{name}}
4 changes: 3 additions & 1 deletion src/templates/component/component.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import { {{name}}Style } from '{{path}}/{{prefix}}.style'

export interface {{name}}I {}

export function {{name}}Component({}: {{name}}I) {
export function {{name}}({}: {{name}}I) {
return (
<{{name}}Style>
<h2>Component {{name}}</h2>
</{{name}}Style>
)
}

export default {{name}}
1 change: 1 addition & 0 deletions src/templates/new/_app.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'public/assets/scss/printer.scss'
import App, { AppContext, AppInitialProps } from 'next/app'
import { wrapper } from 'redux/wrapper'

Expand Down
2 changes: 1 addition & 1 deletion src/templates/new/package.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "next start",
"prepare": "husky install",
"lint": "eslint . --ext ts,tsx --resolve-plugins-relative-to .",
"scss": "node-sass --output-style compact -rw public/assets/scss/printer.scss -o public/assets/css",
"scss": "node-sass --output-style compact -r public/assets/scss/printer.scss -o public/assets/css",
"prisma": "npx prisma generate && npx prisma db push"
},
"dependencies": {
Expand Down
3 changes: 2 additions & 1 deletion src/templates/new/precommit.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint
npm run lint --fix
npm run scss
npm run build
76 changes: 0 additions & 76 deletions test/generators.test.ts

This file was deleted.

0 comments on commit 95c5166

Please sign in to comment.