File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ public function handle(): void
183183 }
184184
185185 if ($ shouldGenerateReadme = $ this ->confirm ('Do you want to generate a README file? ' , true )) {
186- $ this ->readmeGenerator ->generate ($ this ->appName , $ this ->appType ->value );
186+ $ this ->readmeGenerator ->generate ($ this ->appName , $ this ->appType ->value , $ this -> appUrl );
187187
188188 if ($ this ->confirm ('Do you need a `Resources & Contacts` part? ' , true )) {
189189 $ this ->readmeGenerator ->fillResourcesAndContacts ();
@@ -200,14 +200,14 @@ public function handle(): void
200200 }
201201
202202 if ($ this ->confirm ('Do you need an `Environments` part? ' , true )) {
203- $ this ->readmeGenerator ->fillEnvironments ($ this -> appUrl );
203+ $ this ->readmeGenerator ->fillEnvironments ();
204204 }
205205
206206 if ($ this ->confirm ('Do you need a `Credentials and Access` part? ' , true )) {
207207 $ this ->fillCredentialsAndAccess ($ kebabName );
208208
209209 if ($ this ->authType === AuthTypeEnum::Clerk) {
210- $ this ->readmeGenerator ->fillClerkAuthType ();
210+ $ this ->readmeGenerator ->fillClerkAuth ();
211211 }
212212 }
213213 }
Original file line number Diff line number Diff line change @@ -8,8 +8,12 @@ class ReadmeGenerator
88
99 protected string $ content = '' ;
1010
11- public function generate (string $ appName , string $ appType ): void
11+ protected string $ appUrl ;
12+
13+ public function generate (string $ appName , string $ appType , string $ appUrl ): void
1214 {
15+ $ this ->appUrl = $ appUrl ;
16+
1317 $ file = $ this ->loadReadmePart ('README.md ' );
1418
1519 $ this ->setReadmeValue ($ file , 'project_name ' , $ appName );
@@ -33,15 +37,15 @@ public function fillPrerequisites(): void
3337 $ this ->updateReadmeFile ($ filePart );
3438 }
3539
36- public function fillEnvironments (string $ appUrl ): void
40+ public function fillEnvironments (): void
3741 {
3842 $ filePart = $ this ->loadReadmePart ('ENVIRONMENTS.md ' );
3943
40- $ this ->setReadmeValue ($ filePart , 'api_link ' , $ appUrl );
44+ $ this ->setReadmeValue ($ filePart , 'api_link ' , $ this -> appUrl );
4145 $ this ->updateReadmeFile ($ filePart );
4246 }
4347
44- public function fillClerkAuthType (): void
48+ public function fillClerkAuth (): void
4549 {
4650 $ filePart = $ this ->loadReadmePart ('CLERK.md ' );
4751
You can’t perform that action at this time.
0 commit comments