assetic

Less Windows Node.js Hanging

情到浓时终转凉″ 提交于 2019-12-04 07:56:00
I have been trying to setup Symfony2 on Windows so that I can use assetic with less. I have installed node.js for Windows (0.6.8). Then I have run npm install less --global and found less in C:\Users\Matt\AppData\Roaming\npm\node_modules As far as my Symfony setup, I have the master branch of Assetic (due to a bug I read about in 1.0.2), but the standard v1.0.1 of AsseticBundle After some work, I was able to get an example less file to render via: http://localhost/app_dev.php/css/compiled-main_part_1_boilerplate_1.css Then I switched a .less file that @imports other .less files (in the same

Symfony 2 Assetic Fatal error: Class 'Assetic\\Util\\PathUtils' not found on asset dump

喜欢而已 提交于 2019-12-03 23:55:16
I'm using Symfony version 2.1.10 with Assetic and after the last composer update I get the follwoing error when I try to run php app/console assetic:dump Dumping all dev assets. Debug mode is on. Fatal error: Class 'Assetic\Util\PathUtils' not found in /vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php on line 216 I have no idea what is going wrong here. I checkt the GitHub issue page of Assetic and Symfony 2 and couldn't find any information ... config.yml: # Assetic Configuration assetic: debug: "%kernel.debug%" use_controller: false bundles: ['FOSUserBundle'

Using Twig for dynamic Javascript files

孤者浪人 提交于 2019-12-03 13:34:05
I'm working on a kind of dashboard mini site that has blocks with a certain functionality. Using symfony2 I have a dedicated route /instagram that gets an html fragment that shows all the images taken in our venue. I want to refresh this block every 10 minutes, so i need to run the following javascript, in a function with a setTimeout, omitted for clarity. jQuery('.gallery').load("/instagram", function() { jQuery('.gallery').cycle({ fx: 'fade' }); }); This code is in "@KunstmaanDashboardBundle/Resources/public/js/instagram.js" that i run through Assetic for concatenation and optimization. {%

Static assets not refreshing with symfony2 clear cache command

旧巷老猫 提交于 2019-12-03 12:00:49
I'm using Assetic with the compass filter to pass and compile .scss files. This part of the setup seems to work fine. However, my understanding was that in the app_dev environment, Symfony 2 would recompile all assets (including css) for each page load and not use the caching system that it employs for prod environment. This seems not to be happening. When I make a change to a .scss file it will only take effect if I use: app/console cache:clear I thought the whole point of the dev environment was to avoid having to do this each time?! I've checked the permissions of the cache folders (to be

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

蓝咒 提交于 2019-12-03 11:50:36
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. You could do it if you load the css as an internal stylesheet. Something like this: {% block stylesheets %} {{ parent() }} {%

Configure output dir for Assetic in Symfony2

别说谁变了你拦得住时间么 提交于 2019-12-03 06:01:05
问题 I'd like to globally configure the output dir of where assetic dumps my JS files. Currently, they always go to web/js/* . I want to change this to web/js/compiled/* . It's possible to specify this at a per-file level: http://symfony.com/doc/2.0/cookbook/assetic/asset_management.html#dumping-asset-files Can't seem to find a way to set this globally across my Symfony app. Any config parameter I'm missing? UPDATE Found an assetic config parameter called write_to . Setting this in config.yml

Assetic unable to find file

拜拜、爱过 提交于 2019-12-03 05:45:22
I am trying to link a css file (that lives in a bundle) inside a twig template : {% stylesheets '@AcmeFooBundle/Resources/public/css/bootstrap.min.css' %} <link href="{{ asset_url }}" rel="stylesheet"/> {% endstylesheets %} The first error message I get is: You must add AcmeFooBundle to the assetic.bundle config... This is the config : # Assetic Configuration assetic: debug: %kernel.debug% use_controller: false bundles: [] #java: /usr/bin/java filters: cssrewrite: ~ #closure: # jar: %kernel.root_dir%/Resources/java/compiler.jar #yui_css: # jar: %kernel.root_dir%/Resources/java/yuicompressor-2

Assetic - Route “_assetic_001d5b7_0” does not exist

拟墨画扇 提交于 2019-12-02 20:28:01
This question seems to have been asked multiple times but none of the solutions work for me. I'm in my prod environment, here is what I've done: cleared cache before/after doing anything attempted commenting out the _assetic stuff in config_dev and ensure it isn't anywhere else (not that this should matter in prod env) set use_controller to both true and false (obviously works with true but doesn't use the compiled files) Is there anything else I'm missing? The files are generating completely fine from php app/console assetic:dump --env=prod --no-debug the file name matches that of in the

Configure output dir for Assetic in Symfony2

左心房为你撑大大i 提交于 2019-12-02 19:26:24
I'd like to globally configure the output dir of where assetic dumps my JS files. Currently, they always go to web/js/* . I want to change this to web/js/compiled/* . It's possible to specify this at a per-file level: http://symfony.com/doc/2.0/cookbook/assetic/asset_management.html#dumping-asset-files Can't seem to find a way to set this globally across my Symfony app. Any config parameter I'm missing? UPDATE Found an assetic config parameter called write_to . Setting this in config.yml causes the command line assetic:dump to dump files to the new dir, but within twig files the asset_url var

Unable to load Sass / Compass after installing RVM, to use with Assetic in Symfony2

穿精又带淫゛_ 提交于 2019-12-02 06:57:27
问题 I was trying to use Capifony, which requires Capistrano, which requires Ruby. But my apt version of ruby was old and was throwing syntax errors. So then I installed RVM and did this: $ rvm use 1.9.3 $ rvm --rvmrc --create use 1.9.3@myapp $ gem install sass [--pre] $ gem install compass [--pre] $ updatedb $ locate sass | grep myapp | grep bin $ locate compass | grep myapp | grep bin Copied and pasted those paths to config.yml sass: bin: /usr/local/rvm/gems/ruby-1.9.3-p194@myapp/gems/sass-3.2.0