Skip to content

Commit

Permalink
Merge pull request #104 from Spomky-Labs/temp-46a4ed
Browse files Browse the repository at this point in the history
Merge-up from 1.0.6 to 1.1.x
  • Loading branch information
Spomky authored Mar 5, 2024
2 parents 5c9d240 + 3046639 commit bb88c05
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
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

0 comments on commit bb88c05

Please sign in to comment.