Skip to content

Commit e01cd8a

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 e01cd8a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Commands/BuildCommand.php

Lines changed: 6 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,9 @@ public function handle(): void
4143
echo $output;
4244
});
4345

44-
$this->checkAndBuildProjectAssets(null);
46+
if ($this->option('assets')) {
47+
$this->checkAndBuildProjectAssets($this->option('asset-build'));
48+
}
4549

4650
$os = $this->selectOs($this->argument('os'));
4751

0 commit comments

Comments
 (0)