Reputation: 10018
I have couples of CSS files in static directory of my Flask project and couple of SCSS fiels. Now I am compiling SCSS files manualy but I want Flask-Assets do it for me. I know how to prepare bundle of CSS only but is there way to mix into this bundle SCSS filec which must be compiled by filter="pyscss"
before bundling?
Upvotes: 0
Views: 306
Reputation: 1836
I'm not sure about the pyscss
filter but yes, you can bundle CSS and SCSS files together with the scss
filter. The filter will only apply to the relevant files (*.scss
in this case.) Working code from one of my projects:
assets.register(
'css_admin',
Bundle(
'bootstrap/dist/css/bootstrap.min.css',
'admin.scss',
filters='scss', output='admin.css'
)
)
Upvotes: 1