- #TODO: see how we deal with asset url generation: see Rapsys/PackBundle/Twig/PackTokenParser.php +243
- #framework:
- # assets:
- # packages:
- # rapsys_pack:
- # base_path: '/'
- # version: ~
- #
- ## Force cache disable to regenerate resources each time
- ##twig:
- ## cache: ~
-
- //TODO: see https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php for default value and description
- //TODO: see http://symfony.com/doc/current/components/config/definition.html
- //TODO: see https://github.com/symfony/assetic-bundle/blob/master/DependencyInjection/Configuration.php#L63
- //TODO: use bin/console config:dump-reference to dump class infos
+ /**
+ * XXX: Note about the output schemes
+ *
+ * The output files are written based on the output.<ext> scheme with the * replaced by the hashed path of packed files
+ *
+ * The following service configuration make twig render the output file path with the right '/' basePath prefix:
+ * services:
+ * assets.pack_package:
+ * class: Rapsys\PackBundle\Asset\PathPackage
+ * arguments: [ '/', '@assets.empty_version_strategy', '@assets.context' ]
+ * rapsys_pack.twig.pack_extension:
+ * class: Rapsys\PackBundle\Twig\PackExtension
+ * arguments: [ '@file_locator', '@service_container', '@assets.pack_package' ]
+ * tags: [ twig.extension ]
+ */