0

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?

Alex G.P.
  • 9,609
  • 6
  • 46
  • 81

1 Answers1

1

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'
    )
)
vivekagr
  • 1,786
  • 15
  • 23