Commit 6466c97
authored
fix: show help text and refresh help formatting (#3399)
- Show help text when `-h` or `--help` is passed to `@fresh/init`
- Print current version for `@fresh/init` during `--help`
<img width="367" height="95" alt="image"
src="https://github.com/user-attachments/assets/e3318fae-ce8a-4cbb-bb0a-78f338f1b3a2"
/>
- Refresh `--help` text with colors similar to `deno -h`; + "Fresh
branding" style for the `@fresh/init` text
- Print `@fresh/core` version when `@fresh/init` runs
<img width="471" height="88" alt="image"
src="https://github.com/user-attachments/assets/1a0bd619-315d-4abb-889c-ec6eb3a9b45f"
/>
I think showing versions is helpful for verifying/debugging what Fresh
version will be installed during init before all files are generated.
## Comparisons
### `@fresh/init` + empty project name
#### Before
<img width="1104" height="615" alt="image"
src="https://github.com/user-attachments/assets/b1534bb5-eecc-4692-9977-df3903868416"
/>
#### After
<img width="1169" height="695" alt="image"
src="https://github.com/user-attachments/assets/6a743d79-bb59-463a-aadd-fbf734149258"
/>
### `@fresh/init --help`
#### Before
<img width="1007" height="150" alt="image"
src="https://github.com/user-attachments/assets/0ad42078-420c-4dc6-9561-4a338cc09741"
/>
#### After
<img width="1272" height="579" alt="image"
src="https://github.com/user-attachments/assets/3dfe6712-8604-4429-a418-5e6538117303"
/>1 parent a473cc9 commit 6466c97
2 files changed
Lines changed: 57 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
36 | 46 | | |
37 | | - | |
38 | | - | |
| 47 | + | |
| 48 | + | |
39 | 49 | | |
40 | 50 | | |
41 | | - | |
| 51 | + | |
42 | 52 | | |
43 | 53 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
55 | 66 | | |
56 | 67 | | |
57 | 68 | | |
| |||
73 | 84 | | |
74 | 85 | | |
75 | 86 | | |
| 87 | + | |
| 88 | + | |
76 | 89 | | |
77 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
78 | 98 | | |
79 | 99 | | |
80 | 100 | | |
81 | 101 | | |
82 | 102 | | |
83 | 103 | | |
84 | 104 | | |
| 105 | + | |
85 | 106 | | |
86 | 107 | | |
87 | 108 | | |
| |||
535 | 556 | | |
536 | 557 | | |
537 | 558 | | |
538 | | - | |
539 | | - | |
540 | 559 | | |
541 | 560 | | |
542 | 561 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
30 | 39 | | |
31 | 40 | | |
32 | 41 | | |
| |||
75 | 84 | | |
76 | 85 | | |
77 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
78 | 99 | | |
79 | 100 | | |
80 | 101 | | |
| |||
0 commit comments