createManifestAndWriteFiles example

$outputDir = $this->publicAssetsPathResolver->getPublicFilesystemPath();
        if ($input->getOption('clean')) {
            $io->comment(sprintf('Cleaning <info>%s</info>', $outputDir));
            $this->filesystem->remove($outputDir);
            $this->filesystem->mkdir($outputDir);
        }

        $manifestPath = $outputDir.'/'.AssetMapper::MANIFEST_FILE_NAME;
        if (is_file($manifestPath)) {
            $this->filesystem->remove($manifestPath);
        }
        $manifest = $this->createManifestAndWriteFiles($io$publicDir);
        $this->filesystem->dumpFile($manifestPathjson_encode($manifest, \JSON_PRETTY_PRINT));
        $io->comment(sprintf('Manifest written to <info>%s</info>', $this->shortenPath($manifestPath)));

        $importMapPath = $outputDir.'/'.ImportMapManager::IMPORT_MAP_FILE_NAME;
        if (is_file($importMapPath)) {
            $this->filesystem->remove($importMapPath);
        }
        $this->filesystem->dumpFile($importMapPath$this->importMapManager->getImportMapJson());

        $importMapPreloadPath = $outputDir.'/'.ImportMapManager::IMPORT_MAP_PRELOAD_FILE_NAME;
        if (is_file($importMapPreloadPath)) {
            
Home | Imprint | This part of the site doesn't use cookies.