+ /**
+ * 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 ]
+ */
+
+ //The bundle default values
+ $defaults = [
+ 'config' => [
+ 'name' => 'asset_url',
+ 'scheme' => 'https://',
+ 'timeout' => (int)ini_get('default_socket_timeout'),
+ 'agent' => (string)ini_get('user_agent')?:'rapsys_pack/0.1.8',
+ 'redirect' => 5
+ ],
+ 'output' => [
+ 'css' => '@RapsysPack/css/*.pack.css',
+ 'js' => '@RapsysPack/js/*.pack.js',
+ 'img' => '@RapsysPack/img/*.pack.jpg'
+ ],
+ 'filters' => [
+ 'css' => [
+ 0 => [
+ 'class' => 'Rapsys\PackBundle\Twig\Filter\CPackFilter',
+ 'args' => [
+ $finder->find('cpack', '/usr/local/bin/cpack'),
+ 'minify'
+ ]
+ ]
+ ],
+ 'js' => [
+ 0 => [
+ 'class' => 'Rapsys\PackBundle\Twig\Filter\JPackFilter',
+ 'args' => [
+ $finder->find('jpack', '/usr/local/bin/jpack'),
+ 'best'
+ ]
+ ]
+ ],
+ 'img' => [
+ 0 => [
+ 'class' => 'Rapsys\PackBundle\Twig\Filter\IPackFilter',
+ 'args' => []
+ ]
+ ],
+ ]
+ ];