miracle2k / flask-assets

Flask webassets integration.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

--parse-templates is no longer supported

juokaz opened this issue · comments

The Flask 0.11 CLI does not support the --parse-templates functionality, while the Flask Script CLI does.

@miracle2k any idea how we can bypass that ?

My quick and dirty workaround is to keep a Flask-Script script around:

from flask_assets import ManageAssets as AssetsCommand
from flask_script import Manager

from app import create_app


app = create_app()
manager = Manager(app)
manager.add_command('assets', AssetsCommand)

if __name__ == '__main__':
    manager.run()

Looking at the code, the Flask-Script and Click implementations use a completely different approach to call the webassets library, so it seems to be a real pain to fix this :(