assetic

source mapping with assetic in symfony2

我只是一个虾纸丫 提交于 2021-02-18 21:11:53
问题 there is this cool feature Source Maps in html5. In my Symfony2 project I use jQuery mobile which uses this feature (I use the BmatznerJQueryMobileBundle for integration). In my <head> i do following: {% javascripts '@BmatznerJQueryBundle/Resources/public/js/jquery.min.js' '@BmatznerJQueryMobileBundle/Resources/public/js/jquery.mobile.min.js' %} <script src="{{ asset_url }}"></script> {% endjavascripts %} This works fine for the js files, but Chrome gets an 404 error trying to get the source

source mapping with assetic in symfony2

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-18 21:04:01
问题 there is this cool feature Source Maps in html5. In my Symfony2 project I use jQuery mobile which uses this feature (I use the BmatznerJQueryMobileBundle for integration). In my <head> i do following: {% javascripts '@BmatznerJQueryBundle/Resources/public/js/jquery.min.js' '@BmatznerJQueryMobileBundle/Resources/public/js/jquery.mobile.min.js' %} <script src="{{ asset_url }}"></script> {% endjavascripts %} This works fine for the js files, but Chrome gets an 404 error trying to get the source

symfony /css /images sub folder files not viewable on production

我的未来我决定 提交于 2020-04-17 22:54:56
问题 I get a 404 error when trying to access css/style.css or images/image.png in production on live server, however these work locally. I believe it maybe due to the folder location in web/css folder of project. I don't use assetic management or other apart from with js which works for /js/jsfile.js with assetic dump. Css never seemed to work for me so I previously referenced the bundle folder directly, but now just want to use /css or /images <img src="{{asset('/images/image.png')}}" I tried

Symfony Unable to Generate a URL for Route to Stylesheet

ε祈祈猫儿з 提交于 2020-02-03 18:57:11
问题 I have two CSS files in the same folder, with identical access rights. When testing in the same Twig file, one CSS file generates a URL to the file and loads perfectly and one gives an error. Error An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "_assetic_a328b4c_0" as such route does not exist.") in @GutensiteStream/Stream35163.html.twig at line 19. Files on Server ls -al /var/www/core/cms/src/Templates/GutensiteAdminBundle

Symfony Unable to Generate a URL for Route to Stylesheet

两盒软妹~` 提交于 2020-02-03 18:57:10
问题 I have two CSS files in the same folder, with identical access rights. When testing in the same Twig file, one CSS file generates a URL to the file and loads perfectly and one gives an error. Error An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "_assetic_a328b4c_0" as such route does not exist.") in @GutensiteStream/Stream35163.html.twig at line 19. Files on Server ls -al /var/www/core/cms/src/Templates/GutensiteAdminBundle

Run CSS file through Twig when using {% stylesheets %} tag in Twig with Symfony2

a 夏天 提交于 2020-01-12 07:14:01
问题 I'm including CSS stylesheets in my template like so: {% stylesheets "@SomeBundle/Resources/assets/css/default.css.twig" "@SomeBundle/Resources/assets/css/global.css.twig" %} <link rel="stylesheet" href="{{ asset_url }}" /> {% endstylesheets %} However I want to run these CSS files through Twig, is this in any way possible while using the {% stylesheets %} tag or does this require some other approach. I've already tried enabling a twig filter but that does not exist. 回答1: You could do it if

Run CSS file through Twig when using {% stylesheets %} tag in Twig with Symfony2

半腔热情 提交于 2020-01-12 07:13:06
问题 I'm including CSS stylesheets in my template like so: {% stylesheets "@SomeBundle/Resources/assets/css/default.css.twig" "@SomeBundle/Resources/assets/css/global.css.twig" %} <link rel="stylesheet" href="{{ asset_url }}" /> {% endstylesheets %} However I want to run these CSS files through Twig, is this in any way possible while using the {% stylesheets %} tag or does this require some other approach. I've already tried enabling a twig filter but that does not exist. 回答1: You could do it if

Difference between assetic:dump and assets:install

半腔热情 提交于 2020-01-09 08:25:12
问题 In Symfony2, what is the difference between assetic:dump and assets:install ? In what scenarios should each of these commands be used, and in what order (if order is relevant)? 回答1: I actually wrote about this recently in an article about OroCRM, which is based on Symfony 2. If you want some of the context/why of the different commands, you might find it interesting. There are two different systems for including frontend files (javascript, css, images, etc.) in a Symfony application. The

Difference between assetic:dump and assets:install

烈酒焚心 提交于 2020-01-09 08:24:15
问题 In Symfony2, what is the difference between assetic:dump and assets:install ? In what scenarios should each of these commands be used, and in what order (if order is relevant)? 回答1: I actually wrote about this recently in an article about OroCRM, which is based on Symfony 2. If you want some of the context/why of the different commands, you might find it interesting. There are two different systems for including frontend files (javascript, css, images, etc.) in a Symfony application. The

Symfony2 assetic:dump wrong write_to path

一世执手 提交于 2020-01-07 07:13:08
问题 I have a longtime problem with assetic:dump. I wanna use "assetic" to get Javascript and CSS files from different bundles (I wrote) and collect them to dev and prod environment in the templates. Everytime I wanna dump new files, the assetic:dump command try to write in a complete broken path. app/console assetic:dump [RuntimeException] Unable to create directory /var/www/app/../web//var/www/app/../htdocs/css I also try writing in: (nothing works) app/console assetic:dump web app/console