Flask_Assets not export css from sass

259 Views Asked by At

I'm using Flask_Assets to load sass into Flask.

My code is that:

from flask_assets import Environment, Bundle

assets = Environment(app)
scss = Bundle(
        'scss/modal.scss',
        'scss/buttons.scss'
        filters='pyscss',
        output='all.css'
)
assets.register('scss_all', scss)

I make changes to sass files but they are not automatically exported to css.

Someone knows how to make them export or some command to export manually from the console?

Thanks!!!!

1

There are 1 best solutions below

0
laurajaime On BEST ANSWER

I found answer in this question: https://stackoverflow.com/a/17132137/7290770

from flask_assets import Environment, Bundle
assets = Environment(app)
scss = Bundle(
        'scss/modal.scss',
        'scss/buttons.scss'
        filters='pyscss',
        depends=('**/*.scss'),
        output='all.css'
)
assets.register('scss_all', scss)