Skip to content
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

Merge-up from 1.0.6 to 1.1.x #104

Merged
merged 4 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 1 addition & 3 deletions src/Command/CreateIconsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ public function __construct(
private readonly Filesystem $filesystem,
#[Autowire('%kernel.project_dir%')]
private readonly string $projectDir,
#[Autowire('%spomky_labs_pwa.asset_public_prefix%')]
private readonly string $assetPublicPrefix,
private readonly null|ImageProcessor $imageProcessor,
) {
parent::__construct();
Expand All @@ -54,7 +52,7 @@ protected function configure(): void
'o',
InputOption::VALUE_OPTIONAL,
'The output directory',
sprintf('%s%s/icons/', $this->projectDir, $this->assetPublicPrefix)
sprintf('%s/assets/icons/', $this->projectDir)
);
$this->addOption('filename', null, InputOption::VALUE_OPTIONAL, 'The output directory', 'icon');
$this->addOption(
Expand Down
4 changes: 1 addition & 3 deletions src/Command/CreateScreenshotCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ public function __construct(
#[Autowire('%kernel.project_dir%')]
private readonly string $projectDir,
private readonly null|ImageProcessor $imageProcessor,
#[Autowire('%spomky_labs_pwa.asset_public_prefix%')]
private readonly string $assetPublicPrefix,
#[Autowire('@pwa.web_client')]
null|Client $webClient = null,
) {
Expand Down Expand Up @@ -66,7 +64,7 @@ protected function configure(): void
'o',
InputOption::VALUE_OPTIONAL,
'The output directory',
sprintf('%s%s/icons/', $this->projectDir, $this->assetPublicPrefix)
sprintf('%s/assets/screenshots/', $this->projectDir)
);
$this->addOption('filename', null, InputOption::VALUE_OPTIONAL, 'The output filename', 'screenshot');
$this->addOption('width', null, InputOption::VALUE_OPTIONAL, 'The width of the screenshot');
Expand Down
4 changes: 1 addition & 3 deletions src/Command/CreateServiceWorkerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ final class CreateServiceWorkerCommand extends Command
public function __construct(
private readonly AssetMapperInterface $assetMapper,
private readonly Filesystem $filesystem,
#[Autowire('%spomky_labs_pwa.asset_public_prefix%')]
private readonly string $assetPublicPrefix,
#[Autowire('%kernel.project_dir%')]
private readonly string $projectDir,
) {
Expand All @@ -38,7 +36,7 @@ protected function configure(): void
'output',
InputArgument::OPTIONAL,
'The output file',
sprintf('%s%s/sw.js', $this->projectDir, $this->assetPublicPrefix)
sprintf('%s/assets/sw.js', $this->projectDir)
);
$this->addOption('force', 'f', InputOption::VALUE_NONE, 'Force the generation of the service worker');
}
Expand Down
4 changes: 2 additions & 2 deletions src/Service/ServiceWorkerCompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@

public function __construct(
private SerializerInterface $serializer,
#[Autowire('%spomky_labs_pwa.asset_public_prefix%')]
private readonly string $assetPublicPrefix,
#[Autowire('%spomky_labs_pwa.manifest.public_url%')]
string $manifestPublicUrl,
#[Autowire('%spomky_labs_pwa.sw.enabled%')]
private bool $serviceWorkerEnabled,
#[Autowire('%spomky_labs_pwa.asset_public_prefix%')]
private string $assetPublicPrefix,
private Manifest $manifest,
private ServiceWorker $serviceWorker,
private AssetMapperInterface $assetMapper,
Expand Down