File tree Expand file tree Collapse file tree 6 files changed +30
-6
lines changed Expand file tree Collapse file tree 6 files changed +30
-6
lines changed Original file line number Diff line number Diff line change 1515use Native \Electron \Traits \OsAndArch ;
1616use Native \Electron \Traits \PatchesPackagesJson ;
1717use Native \Electron \Traits \PrunesVendorDirectory ;
18+ use Symfony \Component \Console \Attribute \AsCommand ;
1819use Symfony \Component \Process \Process as SymfonyProcess ;
1920
2021use function Laravel \Prompts \intro ;
2122
23+ #[AsCommand(
24+ name: 'native:build ' ,
25+ description: 'Build the NativePHP application for the specified operating system and architecture. ' ,
26+ )]
2227class BuildCommand extends Command
2328{
2429 use CleansEnvFile;
Original file line number Diff line number Diff line change 1717use Native \Electron \Traits \LocatesPhpBinary ;
1818use Native \Electron \Traits \PatchesPackagesJson ;
1919use Native \Electron \Traits \PrunesVendorDirectory ;
20+ use Symfony \Component \Console \Attribute \AsCommand ;
2021use Symfony \Component \Finder \Finder ;
2122use ZipArchive ;
2223
2324use function Laravel \Prompts \intro ;
2425
26+ #[AsCommand(
27+ name: 'native:bundle ' ,
28+ description: 'Bundle your application for distribution. ' ,
29+ )]
2530class BundleCommand extends Command
2631{
2732 use CleansEnvFile;
@@ -35,8 +40,6 @@ class BundleCommand extends Command
3540
3641 protected $ signature = 'native:bundle {--fetch} {--clear} {--without-cleanup} ' ;
3742
38- protected $ description = 'Bundle your application for distribution. ' ;
39-
4043 private ?string $ key ;
4144
4245 private string $ zipPath ;
Original file line number Diff line number Diff line change 88use Native \Electron \Traits \Installer ;
99use Native \Electron \Traits \InstallsAppIcon ;
1010use Native \Electron \Traits \PatchesPackagesJson ;
11+ use Symfony \Component \Console \Attribute \AsCommand ;
1112
1213use function Laravel \Prompts \intro ;
1314use function Laravel \Prompts \note ;
1415
16+ #[AsCommand(
17+ name: 'native:serve ' ,
18+ description: 'Start the NativePHP development server with the Electron app ' ,
19+ )]
1520class DevelopCommand extends Command
1621{
1722 use CopiesCertificateAuthority;
Original file line number Diff line number Diff line change 55use Illuminate \Console \Command ;
66use Native \Electron \Traits \Installer ;
77use RuntimeException ;
8+ use Symfony \Component \Console \Attribute \AsCommand ;
89
910use function Laravel \Prompts \confirm ;
1011use function Laravel \Prompts \info ;
1112use function Laravel \Prompts \intro ;
1213use function Laravel \Prompts \note ;
1314use function Laravel \Prompts \outro ;
1415
16+ #[AsCommand(
17+ name: 'native:install ' ,
18+ description: 'Install all of the NativePHP resources ' ,
19+ )]
1520class InstallCommand extends Command
1621{
1722 use Installer;
@@ -20,8 +25,6 @@ class InstallCommand extends Command
2025 {--force : Overwrite existing files by default}
2126 {--installer=npm : The package installer to use: npm, yarn or pnpm} ' ;
2227
23- protected $ description = 'Install all of the NativePHP resources ' ;
24-
2528 public function handle (): void
2629 {
2730 intro ('Publishing NativePHP Service Provider... ' );
Original file line number Diff line number Diff line change 66use Illuminate \Support \Facades \Artisan ;
77use Native \Electron \Traits \LocatesPhpBinary ;
88use Native \Electron \Traits \OsAndArch ;
9+ use Symfony \Component \Console \Attribute \AsCommand ;
910
11+ #[AsCommand(
12+ name: 'native:publish ' ,
13+ description: 'Build and publish the NativePHP app for the specified operating system and architecture ' ,
14+ )]
1015class PublishCommand extends Command
1116{
1217 use LocatesPhpBinary;
Original file line number Diff line number Diff line change 44
55use Illuminate \Console \Command ;
66use Native \Electron \Traits \PatchesPackagesJson ;
7+ use Symfony \Component \Console \Attribute \AsCommand ;
78use Symfony \Component \Filesystem \Filesystem ;
89
910use function Laravel \Prompts \intro ;
1011
12+ #[AsCommand(
13+ name: 'native:reset ' ,
14+ description: 'Clear all build and dist files ' ,
15+ )]
1116class ResetCommand extends Command
1217{
1318 use PatchesPackagesJson;
1419
1520 protected $ signature = 'native:reset {--with-app-data : Clear the app data as well} ' ;
1621
17- protected $ description = 'Clear all build and dist files ' ;
18-
1922 public function handle (): int
2023 {
2124 intro ('Clearing build and dist directories... ' );
You can’t perform that action at this time.
0 commit comments