|
18 | 18 | use Symfony\Component\AssetMapper\AssetMapperRepository;
|
19 | 19 | use Symfony\Component\AssetMapper\Command\AssetMapperCompileCommand;
|
20 | 20 | use Symfony\Component\AssetMapper\Command\DebugAssetMapperCommand;
|
21 |
| -use Symfony\Component\AssetMapper\Command\ImportMapExportCommand; |
22 | 21 | use Symfony\Component\AssetMapper\Command\ImportMapInstallCommand;
|
23 | 22 | use Symfony\Component\AssetMapper\Command\ImportMapRemoveCommand;
|
24 | 23 | use Symfony\Component\AssetMapper\Command\ImportMapRequireCommand;
|
|
28 | 27 | use Symfony\Component\AssetMapper\Compiler\SourceMappingUrlsCompiler;
|
29 | 28 | use Symfony\Component\AssetMapper\Factory\CachedMappedAssetFactory;
|
30 | 29 | use Symfony\Component\AssetMapper\Factory\MappedAssetFactory;
|
| 30 | +use Symfony\Component\AssetMapper\ImportMap\ImportMapConfigReader; |
31 | 31 | use Symfony\Component\AssetMapper\ImportMap\ImportMapManager;
|
32 | 32 | use Symfony\Component\AssetMapper\ImportMap\ImportMapRenderer;
|
33 | 33 | use Symfony\Component\AssetMapper\ImportMap\Resolver\JsDelivrEsmResolver;
|
|
100 | 100 | param('kernel.project_dir'),
|
101 | 101 | abstract_arg('public directory name'),
|
102 | 102 | param('kernel.debug'),
|
| 103 | + service('event_dispatcher')->nullOnInvalid(), |
103 | 104 | ])
|
104 | 105 | ->tag('console.command')
|
105 | 106 |
|
|
130 | 131 |
|
131 | 132 | ->set('asset_mapper.compiler.javascript_import_path_compiler', JavaScriptImportPathCompiler::class)
|
132 | 133 | ->args([
|
| 134 | + service('asset_mapper.importmap.manager'), |
133 | 135 | abstract_arg('missing import mode'),
|
134 | 136 | service('logger'),
|
135 | 137 | ])
|
136 | 138 | ->tag('asset_mapper.compiler')
|
137 | 139 | ->tag('monolog.logger', ['channel' => 'asset_mapper'])
|
138 | 140 |
|
| 141 | + ->set('asset_mapper.importmap.config_reader', ImportMapConfigReader::class) |
| 142 | + ->args([ |
| 143 | + abstract_arg('importmap.php path'), |
| 144 | + ]) |
| 145 | + |
139 | 146 | ->set('asset_mapper.importmap.manager', ImportMapManager::class)
|
140 | 147 | ->args([
|
141 | 148 | service('asset_mapper'),
|
142 | 149 | service('asset_mapper.public_assets_path_resolver'),
|
143 |
| - abstract_arg('importmap.php path'), |
| 150 | + service('asset_mapper.importmap.config_reader'), |
144 | 151 | abstract_arg('vendor directory'),
|
145 | 152 | service('asset_mapper.importmap.resolver'),
|
146 | 153 | service('http_client'),
|
|
180 | 187 | ->set('asset_mapper.importmap.renderer', ImportMapRenderer::class)
|
181 | 188 | ->args([
|
182 | 189 | service('asset_mapper.importmap.manager'),
|
| 190 | + service('assets.packages')->nullOnInvalid(), |
183 | 191 | param('kernel.charset'),
|
184 | 192 | abstract_arg('polyfill URL'),
|
185 | 193 | abstract_arg('script HTML attributes'),
|
|
201 | 209 | ->args([service('asset_mapper.importmap.manager')])
|
202 | 210 | ->tag('console.command')
|
203 | 211 |
|
204 |
| - ->set('asset_mapper.importmap.command.export', ImportMapExportCommand::class) |
205 |
| - ->args([service('asset_mapper.importmap.manager')]) |
206 |
| - ->tag('console.command') |
207 |
| - |
208 | 212 | ->set('asset_mapper.importmap.command.install', ImportMapInstallCommand::class)
|
209 | 213 | ->args([service('asset_mapper.importmap.manager')])
|
210 | 214 | ->tag('console.command')
|
|
0 commit comments