Skip to content

Commit 7f47c2e

Browse files
committed
Refactor command name
Signed-off-by: Pushpak Chhajed <[email protected]>
1 parent 3aa2c8d commit 7f47c2e

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

.ai/foundation.blade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@php
2-
/** @var \Laravel\Boost\Install\GuidelineAssist $assist */
2+
/** @var \Laravel\Boost\Install\GuidelineAssist $assist */
33
@endphp
44
# Laravel Boost Guidelines
55

@@ -10,11 +10,11 @@
1010

1111
- php - {{ PHP_VERSION }}
1212
@foreach (app(\Laravel\Roster\Roster::class)->packages()->unique(fn ($package) => $package->rawName()) as $package)
13-
- {{ $package->rawName() }} ({{ $package->name() }}) - v{{ $package->majorVersion() }}
13+
- {{ $package->rawName() }} ({{ $package->name() }}) - v{{ $package->majorVersion() }}
1414
@endforeach
1515

1616
@if (! empty(config('boost.purpose')))
17-
Application purpose: {!! config('boost.purpose') !!}
17+
Application purpose: {!! config('boost.purpose') !!}
1818

1919
@endif
2020
## Conventions
@@ -30,7 +30,7 @@
3030
- Do not change the application's dependencies without approval.
3131

3232
## Frontend Bundling
33-
- If the user doesn't see a frontend change reflected in the UI, it could mean they need to run `{{ $assist->nodePackageManager('run build') }}`, `{{ $assist->nodePackageManager('run dev') }}`, or `{{ $assist->composerCommand('run dev') }}`. Ask them.
33+
- If the user doesn't see a frontend change reflected in the UI, it could mean they need to run `{{ $assist->nodePackageManagerCommand('run build') }}`, `{{ $assist->nodePackageManagerCommand('run dev') }}`, or `{{ $assist->composerCommand('run dev') }}`. Ask them.
3434

3535
## Replies
3636
- Be concise in your explanations - focus on what's important rather than explaining obvious details.

.ai/laravel/core.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@
4242
- When creating tests, make use of `{{ $assist->artisanCommand('make:test [options] <name>') }}` to create a feature test, and pass `--unit` to create a unit test. Most tests should be feature tests.
4343

4444
### Vite Error
45-
- If you receive an "Illuminate\Foundation\ViteException: Unable to locate file in Vite manifest" error, you can run `{{ $assist->nodePackageManager('run build') }}` or ask the user to run `{{ $assist->nodePackageManager('run dev') }}` or `{{ $assist->composerCommand('run dev') }}`.
45+
- If you receive an "Illuminate\Foundation\ViteException: Unable to locate file in Vite manifest" error, you can run `{{ $assist->nodePackageManagerCommand('run build') }}` or ask the user to run `{{ $assist->nodePackageManagerCommand('run dev') }}` or `{{ $assist->composerCommand('run dev') }}`.

.ai/sail/core.blade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
- Start services using `{{$assist->sailBinaryPath()}} up -d` and stop them with `{{$assist->sailBinaryPath()}} stop`.
88
- Open the application in the browser by running `{{$assist->sailBinaryPath()}} open`.
99
- Always prefix PHP, Artisan, Composer, and Node commands** with `{{$assist->sailBinaryPath()}}`. Examples:
10-
- Run Artisan Commands: `{{$assist->artisanCommand('migrate')}}`
11-
- Install Composer packages: `{{$assist->composerCommand('install')}}`
12-
- Execute node commands: `{{$assist->nodePackageManager('run dev')}}`
13-
- Execute PHP scripts: `{{$assist->sailBinaryPath()}} php [script]`
10+
- Run Artisan Commands: `{{$assist->artisanCommand('migrate')}}`
11+
- Install Composer packages: `{{$assist->composerCommand('install')}}`
12+
- Execute node commands: `{{$assist->nodePackageManagerCommand('run dev')}}`
13+
- Execute PHP scripts: `{{$assist->sailBinaryPath()}} php [script]`
1414
- View all available Sail commands by running `{{$assist->sailBinaryPath()}}` without arguments.

src/Install/GuidelineAssist.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public function inertia(): Inertia
164164
return new Inertia($this->roster);
165165
}
166166

167-
public function nodePackageManager(string $command): string
167+
public function nodePackageManagerCommand(string $command): string
168168
{
169169
$manager = ($this->roster->nodePackageManager() ?? NodePackageManager::NPM)->value;
170170
$nodePackageManagerCommand = $this->config->usesSail

tests/Feature/Install/GuidelineComposerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@
468468
// Processes blade variables correctly
469469
->toContain('=== .ai/test-blade-with-assist rules ===')
470470
->toContain('Run `npm install` to install dependencies')
471-
->toContain('Package manager: npm')
471+
->toContain('Package manager: npm install')
472472
// Preserves @volt directives in blade templates
473473
->toContain('`@volt`')
474474
->toContain('@endvolt')
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Blade with @assist variable
22

3-
Run `{{ $assist->nodePackageManager('install') }}` to install dependencies.
3+
Run `{{ $assist->nodePackageManagerCommand('install') }}` to install dependencies.
44

5-
Package manager: {{ $assist->nodePackageManager('install') }}
5+
Package manager: {{ $assist->nodePackageManagerCommand('install') }}

0 commit comments

Comments
 (0)