Skip to content

Commit 4397c61

Browse files
committed
Implement signature option for asset-build
- Specify `--assets` to build assets - If --asset-build is unspecified, we'll try to run `npm run build`. - A specific build command can be specified like so `--asset-build=my-build-command`
1 parent 5305c19 commit 4397c61

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Commands/BuildCommand.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ class BuildCommand extends Command
2121
protected $signature = 'native:build
2222
{os? : The operating system to build for (all, linux, mac, win)}
2323
{arch? : The Processor Architecture to build for (x64, x86, arm64)}
24-
{--publish : to publish the app}';
24+
{--publish : to publish the app}
25+
{--assets : to build the project assets}
26+
{--asset-build=build : The NPM script to run to build your project assets}';
2527

2628
protected $availableOs = ['win', 'linux', 'mac', 'all'];
2729

@@ -41,7 +43,7 @@ public function handle(): void
4143
echo $output;
4244
});
4345

44-
$this->checkAndBuildProjectAssets(null);
46+
$this->checkAndBuildProjectAssets($this->option('asset-build'));
4547

4648
$os = $this->selectOs($this->argument('os'));
4749

0 commit comments

Comments
 (0)