Reputation: 472
I have a application with two different base twig files. One is for the main application and the other is for the docs for the application.
In both base files i use different css files. In one base it works and in a other one it does not work.
This is the working base file
{% stylesheets output='css/compiled/main.min.css'
'@CoreBundle/Resources/public/css/feedback.css'
'@CoreBundle/Resources/public/css/general.css'
'@CoreBundle/Resources/public/css/portal.css'
'@UserBundle/Resources/public/css/*.css'
%}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
and this is the base file that does not work
{% stylesheets output='css/compiled/knowledge.min.css'
'@CoreBundle/Resources/public/css/knowledgeCenter.css'
%}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
I have in mijn assetic.yml (which is included in my config.yml)
assetic:
debug: "%kernel.debug%"
use_controller: '%kernel.debug%'
read_from: "%kernel.root_dir%/../web"
bundles: [ ]
#java: /usr/bin/java
filters:
scssphp:
formatter: 'Leafo\ScssPhp\Formatter\Compressed'
uglifyjs2:
bin: /usr/local/bin/uglifyjs
uglifycss:
bin: /usr/local/bin/uglifycss
cssrewrite: ~
#closure:
# jar: "%kernel.root_dir%/Resources/java/compiler.jar"
#yui_css:
# jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar"
The folder @CoreBundle/Resources/public/css looks the following
Note: the knowledgeCenter.css is compiled by phpstorm from scss Note: the .css file is not in the .scss file it is something that phpstorm shows
My console looks like this when i update the assets
As you can see it does not include the css i made in the public/css folder
I have tried the following
Cleaned all the cache and installed assets again with php bin/console
(i tried these commands
bin/console cache:clear
bin/console cache:clear --env=prod
bin/console assets:install web
bin/console assetic:dump
bin/console assetic:dump --env=prod
)
All the following things did not work
Thank you in advance !
Upvotes: 0
Views: 710
Reputation: 528
The documentation here says like this. Maybe u forgot the filter options.
{% stylesheets filter="scssphp" output="css/app.css"
"assets/scss/bootstrap.scss"
"assets/scss/font-awesome.scss"
"assets/css/*.css"
%}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
Upvotes: 0