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 15
15
use Native \Electron \Traits \OsAndArch ;
16
16
use Native \Electron \Traits \PatchesPackagesJson ;
17
17
use Native \Electron \Traits \PrunesVendorDirectory ;
18
+ use Symfony \Component \Console \Attribute \AsCommand ;
18
19
use Symfony \Component \Process \Process as SymfonyProcess ;
19
20
20
21
use function Laravel \Prompts \intro ;
21
22
23
+ #[AsCommand(
24
+ name: 'native:build ' ,
25
+ description: 'Build the NativePHP application for the specified operating system and architecture. ' ,
26
+ )]
22
27
class BuildCommand extends Command
23
28
{
24
29
use CleansEnvFile;
Original file line number Diff line number Diff line change 17
17
use Native \Electron \Traits \LocatesPhpBinary ;
18
18
use Native \Electron \Traits \PatchesPackagesJson ;
19
19
use Native \Electron \Traits \PrunesVendorDirectory ;
20
+ use Symfony \Component \Console \Attribute \AsCommand ;
20
21
use Symfony \Component \Finder \Finder ;
21
22
use ZipArchive ;
22
23
23
24
use function Laravel \Prompts \intro ;
24
25
26
+ #[AsCommand(
27
+ name: 'native:bundle ' ,
28
+ description: 'Bundle your application for distribution. ' ,
29
+ )]
25
30
class BundleCommand extends Command
26
31
{
27
32
use CleansEnvFile;
@@ -35,8 +40,6 @@ class BundleCommand extends Command
35
40
36
41
protected $ signature = 'native:bundle {--fetch} {--clear} {--without-cleanup} ' ;
37
42
38
- protected $ description = 'Bundle your application for distribution. ' ;
39
-
40
43
private ?string $ key ;
41
44
42
45
private string $ zipPath ;
Original file line number Diff line number Diff line change 8
8
use Native \Electron \Traits \Installer ;
9
9
use Native \Electron \Traits \InstallsAppIcon ;
10
10
use Native \Electron \Traits \PatchesPackagesJson ;
11
+ use Symfony \Component \Console \Attribute \AsCommand ;
11
12
12
13
use function Laravel \Prompts \intro ;
13
14
use function Laravel \Prompts \note ;
14
15
16
+ #[AsCommand(
17
+ name: 'native:serve ' ,
18
+ description: 'Start the NativePHP development server with the Electron app ' ,
19
+ )]
15
20
class DevelopCommand extends Command
16
21
{
17
22
use CopiesCertificateAuthority;
Original file line number Diff line number Diff line change 5
5
use Illuminate \Console \Command ;
6
6
use Native \Electron \Traits \Installer ;
7
7
use RuntimeException ;
8
+ use Symfony \Component \Console \Attribute \AsCommand ;
8
9
9
10
use function Laravel \Prompts \confirm ;
10
11
use function Laravel \Prompts \info ;
11
12
use function Laravel \Prompts \intro ;
12
13
use function Laravel \Prompts \note ;
13
14
use function Laravel \Prompts \outro ;
14
15
16
+ #[AsCommand(
17
+ name: 'native:install ' ,
18
+ description: 'Install all of the NativePHP resources ' ,
19
+ )]
15
20
class InstallCommand extends Command
16
21
{
17
22
use Installer;
@@ -20,8 +25,6 @@ class InstallCommand extends Command
20
25
{--force : Overwrite existing files by default}
21
26
{--installer=npm : The package installer to use: npm, yarn or pnpm} ' ;
22
27
23
- protected $ description = 'Install all of the NativePHP resources ' ;
24
-
25
28
public function handle (): void
26
29
{
27
30
intro ('Publishing NativePHP Service Provider... ' );
Original file line number Diff line number Diff line change 6
6
use Illuminate \Support \Facades \Artisan ;
7
7
use Native \Electron \Traits \LocatesPhpBinary ;
8
8
use Native \Electron \Traits \OsAndArch ;
9
+ use Symfony \Component \Console \Attribute \AsCommand ;
9
10
11
+ #[AsCommand(
12
+ name: 'native:publish ' ,
13
+ description: 'Build and publish the NativePHP app for the specified operating system and architecture ' ,
14
+ )]
10
15
class PublishCommand extends Command
11
16
{
12
17
use LocatesPhpBinary;
Original file line number Diff line number Diff line change 4
4
5
5
use Illuminate \Console \Command ;
6
6
use Native \Electron \Traits \PatchesPackagesJson ;
7
+ use Symfony \Component \Console \Attribute \AsCommand ;
7
8
use Symfony \Component \Filesystem \Filesystem ;
8
9
9
10
use function Laravel \Prompts \intro ;
10
11
12
+ #[AsCommand(
13
+ name: 'native:reset ' ,
14
+ description: 'Clear all build and dist files ' ,
15
+ )]
11
16
class ResetCommand extends Command
12
17
{
13
18
use PatchesPackagesJson;
14
19
15
20
protected $ signature = 'native:reset {--with-app-data : Clear the app data as well} ' ;
16
21
17
- protected $ description = 'Clear all build and dist files ' ;
18
-
19
22
public function handle (): int
20
23
{
21
24
intro ('Clearing build and dist directories... ' );
You can’t perform that action at this time.
0 commit comments