assetic

How do you include a plugin in Compass (through Assetic) for Symfony2?

若如初见. 提交于 2020-01-07 00:57:46
问题 I have installed the compass-rgbapng plugin, but am struggling to to include the plugin for use in Symfony2. I need to add the require "rgbapng" to the compass config file, but I am unsure how to do this through Symfony2. Does anyone know how I can do this? 回答1: I think something like that in app/config/config.yml should helps: # Assetic Configuration assetic: filters: compass: plugins: - rgbapng 回答2: Assetic's compass filter looks for a parameter called assetic.filter.compass.plugins : So

symfony2.3 configure assetic with less

陌路散爱 提交于 2020-01-04 07:04:54
问题 I am using Symfony "2.3.*" and I attempt to make assetic less filter working. I do all of this in the "dev" environment. When I issue the config:dump-reference assetic I get the following output: assetic: debug: %kernel.debug% use_controller: enabled: %kernel.debug% profiler: false read_from: %kernel.root_dir%/../web write_to: %assetic.read_from% java: /usr/bin/java node: /usr/bin/node node_paths: [] ruby: /usr/bin/ruby sass: /usr/bin/sass variables: # Prototype name: [] bundles: # Defaults:

Symfony2 Assetic and Less Sourcemaps

时光毁灭记忆、已成空白 提交于 2020-01-03 17:01:52
问题 I am unsure how I can hack the assetic less filter to output a sourcemap file. I am referring to the LessFilter here https://github.com/kriswallsmith/assetic/blob/master/src/Assetic/Filter/LessFilter.php lines 145 and 146 is where the Symfony\Component\Process\Process object is created $proc = $pb->getProcess(); $code = $proc->run(); The trouble is this output gets placed into one single file. I am not sure how to generate a second sourcemap file. How can I extend this filter or hack the

Symfony2 Assetic and Less Sourcemaps

ぃ、小莉子 提交于 2020-01-03 17:01:00
问题 I am unsure how I can hack the assetic less filter to output a sourcemap file. I am referring to the LessFilter here https://github.com/kriswallsmith/assetic/blob/master/src/Assetic/Filter/LessFilter.php lines 145 and 146 is where the Symfony\Component\Process\Process object is created $proc = $pb->getProcess(); $code = $proc->run(); The trouble is this output gets placed into one single file. I am not sure how to generate a second sourcemap file. How can I extend this filter or hack the

500 error when compiling scss in symfony2

孤者浪人 提交于 2020-01-02 17:54:10
问题 I am getting a 500 error when compiling scss files with assetic. Strangely enough, using php app/console assetic:dump the scss compiles without issue. Resources in web/bundles are relative symlinks. I'm running OSX 10.8, symfony 2.3, and php 5.4.20. config.yml # Assetic Configuration assetic: debug: %kernel.debug% use_controller: false bundles: [ ] filters: cssrewrite: ~ sass: apply_to: "\.scss$" base.html.twig {# ... #} {% stylesheets filter='cssrewrite' 'bundles/acmehello/css/main.css'

Fontawesome fonts fail after assets:install and assetic:dump

折月煮酒 提交于 2019-12-30 07:07:27
问题 I'm trying to setting up a site I'm working on at shared hosting and all works fine but FontAwesome icons since Symfony does not find them where they should be. I follow this steps to move the site to production shared hosting: Publish assets as hard copy since SH doesn't allow symlink so I run this command assets:install Publish assets handled by Assetic by running this commands: assetic:dump (dev) and assetic:dump --env=prod (prod) But it's not working since I'm getting this errors at

How can I force assetic to render assets each time the page is reloaded?

房东的猫 提交于 2019-12-30 01:59:10
问题 How can I force assetic to render assets each time the page is reloaded (no matter if assets are modified or not)? More explanation about my issue: I'm currently working on a Symfony2 project where I use Assetic to manage and compile .less files. I got everything to work fine but I'm having a small issue that I'd like to fix. In config.yml, I set the assetic use_controller to true. # Assetic Configuration assetic: debug: %kernel.debug% use_controller: true The result is that Symfony

How to have background image in symfony assets?

邮差的信 提交于 2019-12-24 12:47:27
问题 with symphony framework I did dump assets assets:install. css file is hard copied to /web/bundles/appbundle/css/style.css I guess for background image in css I should have a relative path to reach outside of /web/ folder like this? background-image: url(../../../../bundles/appbundle/images/top_bg.jpg); but it doesn't work yet, I have filter='cssrewrite' in css tag too. probably I have to add that I am only editing the css file located at the path above after assets install, I did not edit the

Symfony2 Twig including header with assets not working

余生颓废 提交于 2019-12-24 04:31:08
问题 I'm trying to include my header into another template, not extending , like this {% include '@Foo:Bar:_header.html.twig' %} That header, contains this <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <title>{{ site.name }}</title> {% block stylesheets %} {% stylesheets "@Foo/Resources

Symfony2 Twig including header with assets not working

回眸只為那壹抹淺笑 提交于 2019-12-24 04:31:03
问题 I'm trying to include my header into another template, not extending , like this {% include '@Foo:Bar:_header.html.twig' %} That header, contains this <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <title>{{ site.name }}</title> {% block stylesheets %} {% stylesheets "@Foo/Resources