Skip to content
  • Sponsor NativePHP/electron

  • Notifications You must be signed in to change notification settings
  • Fork 79
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: bundle builds #179

Merged
merged 29 commits into from
Mar 19, 2025
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2bdf295
feat: native:bundle command
SRWieZ Mar 4, 2025
08a3726
feat: native:bundle --clear
SRWieZ Mar 4, 2025
a2f9888
feat: php.ts run with bundle
SRWieZ Mar 4, 2025
3535d22
fix: require nativephp/laravel on dev-feat/bundle-builds
SRWieZ Mar 4, 2025
b9c6ccf
wip: bundle cached services?
SRWieZ Mar 4, 2025
37eca6a
wip: try with everything first
SRWieZ Mar 4, 2025
613d955
wip: fix .env missing
SRWieZ Mar 4, 2025
666f68b
fix: bundling
SRWieZ Mar 5, 2025
130323a
feat: bundling a base L12 app works 🎉
SRWieZ Mar 5, 2025
e920c44
feat: native:reset command
SRWieZ Mar 10, 2025
b3ecbf6
fix: realpath() returns false if the directory does not exists
SRWieZ Mar 10, 2025
bb7b06a
feat: failsafe
SRWieZ Mar 10, 2025
15de455
wip: it works, but need some minor cleaning/refactoring/testing
SRWieZ Mar 10, 2025
118c85e
perf: fixes and perf of Laravel on subsequent launches
SRWieZ Mar 11, 2025
5724b18
fix: running the bundle in dev mode
SRWieZ Mar 11, 2025
72b29df
fix: consistent appData directory
SRWieZ Mar 11, 2025
ecb8a03
wip: fix running artisan commands in bundle
SRWieZ Mar 11, 2025
029bd2e
feat: artisan commands in bundles
SRWieZ Mar 11, 2025
3e660a7
feat: artisan commands in bundles
SRWieZ Mar 11, 2025
b8f54b9
fix: native:serve will no longer run the bundle
SRWieZ Mar 11, 2025
cba4063
refactor: even more consistency + reducing the size of the bundled bi…
SRWieZ Mar 12, 2025
d28ed6b
feat: Better reset command
SRWieZ Mar 14, 2025
4156153
chore: upgrade outdated packages
SRWieZ Mar 14, 2025
a85d895
docs: added some comments
SRWieZ Mar 14, 2025
6f6fd36
feat: include symlinked composer packages
SRWieZ Mar 14, 2025
07dfc02
Merge branch 'main' into feat/bundle-builds
SRWieZ Mar 14, 2025
22122a5
refactor: per Simon's review
SRWieZ Mar 15, 2025
ed76171
Attempt to understand
simonhamp Mar 18, 2025
45231cd
Attempted fix
simonhamp Mar 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: include symlinked composer packages
SRWieZ committed Mar 14, 2025
commit 6f6fd36e7cc3db3a42ebc86ca491334d4446e4a8
12 changes: 6 additions & 6 deletions src/Commands/BundleCommand.php
Original file line number Diff line number Diff line change
@@ -178,7 +178,7 @@ private function checkComposerJson(): bool
// // }
// }

// Remove repositories with type path
// Remove repositories with type path, we include symlinked packages
if (! empty($composerJson['repositories'])) {

$this->newLine();
@@ -192,10 +192,10 @@ private function checkComposerJson(): bool
file_put_contents($this->buildPath('composer.json'),
json_encode($composerJson, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));

Process::path($this->buildPath())
->run('composer update --no-dev', function (string $type, string $output) {
echo $output;
});
// Process::path($this->buildPath())
// ->run('composer install --no-dev', function (string $type, string $output) {
// echo $output;
// });
}

}
@@ -221,7 +221,7 @@ private function addFilesToZip(ZipArchive $zip): void
intro('Creating zip archive…');

$finder = (new Finder)->files()
// ->followLinks()
->followLinks()
// ->ignoreVCSIgnored(true) // TODO: Make our own list of ignored files
->in($this->buildPath())
->exclude([
2 changes: 1 addition & 1 deletion src/Commands/ResetCommand.php
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ public function handle(): int
$appName = $this->setAppName($developmentMode);

// Eh, just in case, I don't want to delete all user data by accident.
if ( ! empty($appName)) {
if (! empty($appName)) {
$appDataPath = $this->appDataDirectory($appName);
$this->line('Clearing: '.$appDataPath);