Skip to content

Commit

Permalink
fixex: Commands create files in wrong folder (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
Spomky authored Mar 5, 2024
1 parent 6b0c22a commit bdbd318
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 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 @@ -25,8 +25,6 @@ public function __construct(
private readonly AssetMapperInterface $assetMapper,
private readonly Filesystem $filesystem,
private readonly FileLocator $fileLocator,
#[Autowire('%spomky_labs_pwa.asset_public_prefix%')]
private readonly string $assetPublicPrefix,
#[Autowire('%kernel.project_dir%')]
private readonly string $projectDir,
) {
Expand All @@ -39,7 +37,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
2 changes: 1 addition & 1 deletion src/Service/ServiceWorkerCompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
public function __construct(
private SerializerInterface $serializer,
#[Autowire('%spomky_labs_pwa.asset_public_prefix%')]
private readonly string $assetPublicPrefix,
private string $assetPublicPrefix,
#[Autowire('%spomky_labs_pwa.sw.enabled%')]
private bool $serviceWorkerEnabled,
private Manifest $manifest,
Expand Down

0 comments on commit bdbd318

Please sign in to comment.