Skip to content

Commit ccbfddf

Browse files
authored
Merge pull request #13 from laravel/cleanup_application_detector
refactor: replace ApplicationDetector with CodeEnvironementsDetector in InstallCommand and update related methods
2 parents 82229e2 + a25ebf5 commit ccbfddf

26 files changed

+1796
-655
lines changed

src/Console/InstallCommand.php

Lines changed: 63 additions & 108 deletions
Large diffs are not rendered by default.

src/Install/ApplicationDetector.php

Lines changed: 0 additions & 323 deletions
This file was deleted.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Laravel\Boost\Install\CodeEnvironment;
6+
7+
use Laravel\Boost\Install\Enums\Platform;
8+
9+
class ClaudeCode extends CodeEnvironment
10+
{
11+
public function name(): string
12+
{
13+
return 'claudecode';
14+
}
15+
16+
public function displayName(): string
17+
{
18+
return 'Claude Code';
19+
}
20+
21+
public function systemDetectionConfig(Platform $platform): array
22+
{
23+
return match ($platform) {
24+
Platform::Darwin, Platform::Linux => [
25+
'command' => 'which claude',
26+
],
27+
Platform::Windows => [
28+
'command' => 'where claude 2>null',
29+
],
30+
};
31+
}
32+
33+
public function projectDetectionConfig(): array
34+
{
35+
return [
36+
'paths' => ['.claude'],
37+
'files' => ['CLAUDE.md'],
38+
];
39+
}
40+
}

0 commit comments

Comments
 (0)