From: Raphaƫl Gertz <git@rapsys.eu>
Date: Mon, 26 Mar 2018 09:30:25 +0000 (+0200)
Subject: Switch to web directory for compiled assets by default
X-Git-Tag: 0.0.2~9
X-Git-Url: https://git.rapsys.eu/packbundle/commitdiff_plain/5ee696001dcaf768969f0b9f0af1c703218678cc?ds=inline

Switch to web directory for compiled assets by default
---

diff --git a/Resources/config/parameters.yml b/Resources/config/parameters.yml
index 2b22993..900a6c1 100644
--- a/Resources/config/parameters.yml
+++ b/Resources/config/parameters.yml
@@ -21,7 +21,7 @@ framework:
     assets:
         packages:
             rapsys_pack:
-                base_path: '/bundles/rapsyspack'
+                base_path: ~
                 version: ~
 
 # Force cache disable to regenerate resources each time
diff --git a/Twig/PackExtension.php b/Twig/PackExtension.php
index 5ce4ed6..ee84c47 100644
--- a/Twig/PackExtension.php
+++ b/Twig/PackExtension.php
@@ -17,7 +17,8 @@ class PackExtension extends \Twig_Extension {
 		$this->assetsPackages = $assetsPackages;
 
 		//Set default prefix
-		$this->prefix = '@RapsysPackBundle/Resources/public/';
+		//XXX: require symfony 3.3
+		$this->prefix = $this->containerInterface->getParameter('kernel.project_dir').'/web/';
 
 		//Set default coutput
 		$this->coutput = 'css/*.pack.css';