@teispace/next-maker 1.20.0 → 1.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +64 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.20.1](https://github.com/teispace/npm-packages/compare/next-maker-v1.20.0...next-maker-v1.20.1) (2026-05-06)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **next-themes:** sync runtime props, validate cookies, harden hooks ([#68](https://github.com/teispace/npm-packages/issues/68)) ([05dc87c](https://github.com/teispace/npm-packages/commit/05dc87c5155d0919a1b179b8e7b842beebe65596))
|
|
9
|
+
|
|
3
10
|
## [1.20.0](https://github.com/teispace/npm-packages/compare/next-maker-v1.19.2...next-maker-v1.20.0) (2026-05-06)
|
|
4
11
|
|
|
5
12
|
|
package/README.md
CHANGED
|
@@ -38,6 +38,7 @@ next-maker <command> [args] [options]
|
|
|
38
38
|
| Config | `locale [code]` | Add a new language/locale |
|
|
39
39
|
| Code | `hook <name>` | Custom React hook |
|
|
40
40
|
| Code | `test <file>` | Sibling test stub for a component/hook/slice |
|
|
41
|
+
| Assets | `favicon` | Generate `favicon.ico` (and optionally PWA / OG / Apple icons) from a source image |
|
|
41
42
|
|
|
42
43
|
Run `npx @teispace/next-maker <command> --help` for the full option list of any command.
|
|
43
44
|
|
|
@@ -540,6 +541,64 @@ Requires `setup --tests` first.
|
|
|
540
541
|
|
|
541
542
|
---
|
|
542
543
|
|
|
544
|
+
### `favicon` — Generate icons from a source image
|
|
545
|
+
|
|
546
|
+
Generates `favicon.ico` (multi-size) into the App Router root, with optional `icon.png`, `apple-icon.png`, `opengraph-image.png`, `twitter-image.png`, and PWA manifest icons. Source can be PNG, JPG, JPEG, WebP, SVG, or AVIF.
|
|
547
|
+
|
|
548
|
+
```bash
|
|
549
|
+
npx @teispace/next-maker favicon [options]
|
|
550
|
+
```
|
|
551
|
+
|
|
552
|
+
| Flag | Effect |
|
|
553
|
+
| --- | --- |
|
|
554
|
+
| `--path <file>` | Source image. If omitted, you'll be prompted. |
|
|
555
|
+
| `--out <dir>` | Output directory (default: auto-detected `src/app` or `app`) |
|
|
556
|
+
| `--icon` | Also emit `icon.png` (512×512) |
|
|
557
|
+
| `--apple` | Also emit `apple-icon.png` (180×180) |
|
|
558
|
+
| `--og` | Also emit `opengraph-image.png` (1200×630) |
|
|
559
|
+
| `--og-source <file>` | Use a separate image for the OG/Twitter card |
|
|
560
|
+
| `--twitter` | Also emit `twitter-image.png` (1200×600) |
|
|
561
|
+
| `--all` | Shorthand for `--icon --apple --og` |
|
|
562
|
+
| `--pwa` | Detect PWA setup and emit manifest icons (192/512); errors if not detected |
|
|
563
|
+
| `--pwa-init` | Bootstrap `public/manifest.webmanifest` with icons |
|
|
564
|
+
| `--shape <shape>` | `square` \| `rounded` \| `circle` \| `squircle` (default: `square`) |
|
|
565
|
+
| `--radius <percent>` | Corner radius % when `--shape=rounded` (0–50, default: 20) |
|
|
566
|
+
| `--bg <color>` | Background: `transparent`, hex (`#0f172a`), CSS name, or `rgb()`/`rgba()`/`hsl()`/`hsla()` (default: `transparent`) |
|
|
567
|
+
| `--padding <percent>` | Padding around source content (0–30, default: 0) |
|
|
568
|
+
| `--fit <fit>` | `contain` \| `cover` \| `clip` (default: `contain`) |
|
|
569
|
+
| `--sizes <list>` | Comma-separated ICO sizes (default: `16,32,48`) |
|
|
570
|
+
| `--quality <n>` | PNG compression 1–100 (higher = smaller; PNG is lossless, default: 90) |
|
|
571
|
+
| `--force` | Overwrite existing files without prompt |
|
|
572
|
+
| `--dry-run` | Show what would be written without writing |
|
|
573
|
+
|
|
574
|
+
```bash
|
|
575
|
+
# Minimal: just favicon.ico from a source PNG
|
|
576
|
+
npx @teispace/next-maker favicon --path ./brand/logo.png
|
|
577
|
+
|
|
578
|
+
# Full set: favicon + icon + apple-icon + OG image, rounded with brand background
|
|
579
|
+
npx @teispace/next-maker favicon \
|
|
580
|
+
--path ./brand/logo.svg \
|
|
581
|
+
--all \
|
|
582
|
+
--shape rounded --radius 24 \
|
|
583
|
+
--bg "#0f172a" \
|
|
584
|
+
--padding 8
|
|
585
|
+
|
|
586
|
+
# PWA: emit manifest icons and bootstrap public/manifest.webmanifest
|
|
587
|
+
npx @teispace/next-maker favicon --path ./brand/logo.png --pwa-init
|
|
588
|
+
|
|
589
|
+
# Separate OG art
|
|
590
|
+
npx @teispace/next-maker favicon \
|
|
591
|
+
--path ./brand/logo.png \
|
|
592
|
+
--og --og-source ./brand/social-card.png
|
|
593
|
+
|
|
594
|
+
# Preview without writing
|
|
595
|
+
npx @teispace/next-maker favicon --path ./brand/logo.png --all --dry-run
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
Outputs land in your App Router root (`src/app/` or `app/`) so Next.js auto-resolves them via the file conventions for [`favicon.ico`](https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons), [`opengraph-image`](https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image), and [`apple-icon`](https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons) — no `<head>` wiring required.
|
|
599
|
+
|
|
600
|
+
---
|
|
601
|
+
|
|
543
602
|
## End-to-end examples
|
|
544
603
|
|
|
545
604
|
### Quick start
|
|
@@ -663,7 +722,11 @@ my-project/
|
|
|
663
722
|
│ │ ├── not-found.tsx
|
|
664
723
|
│ │ ├── robots.ts
|
|
665
724
|
│ │ ├── sitemap.ts
|
|
666
|
-
│ │
|
|
725
|
+
│ │ ├── favicon.ico # `favicon` command
|
|
726
|
+
│ │ ├── icon.png # (opt, `favicon --icon`/`--all`) 512×512
|
|
727
|
+
│ │ ├── apple-icon.png # (opt, `favicon --apple`/`--all`) 180×180
|
|
728
|
+
│ │ ├── opengraph-image.png # (opt, `favicon --og`/`--all`) 1200×630
|
|
729
|
+
│ │ └── twitter-image.png # (opt, `favicon --twitter`) 1200×600
|
|
667
730
|
│ ├── proxy.ts # (opt, i18n) Next 16 middleware replacement
|
|
668
731
|
│ ├── features/ # Feature modules (feature-first DDD)
|
|
669
732
|
│ │ └── counter/ # (opt, redux) example feature
|