ImportMapManager example


    }

    private function createImportMapManager(array $dirs, string $rootDir, string $publicPrefix = '/assets/', string $publicDirName = 'public'): ImportMapManager
    {
        $pathResolver = new PublicAssetsPathResolver($rootDir$publicPrefix$publicDirName);

        $mapper = $this->createAssetMapper($pathResolver$dirs$rootDir);
        $this->packageResolver = $this->createMock(PackageResolverInterface::class);
        $this->httpClient = $this->createMock(HttpClientInterface::class);

        return new ImportMapManager(
            $mapper,
            $pathResolver,
            $rootDir.'/importmap.php',
            $rootDir.'/assets/vendor',
            $this->packageResolver,
            $this->httpClient,
        );
    }

    private function createAssetMapper(PublicAssetsPathResolverInterface $pathResolver, array $dirs, string $rootDir): AssetMapper
    {
        
Home | Imprint | This part of the site doesn't use cookies.