Asset management in Flask
How to merge, minify and compile the code of your web assets in Flask
webassets is an asset management library for Python. Flask-Assets is an integration of webassets in your Flask application.
Flask-Assets helps you to integrate webassets into your Flask application.
pip install Flask-Assets
2. Create an environment
3. Defining assets
you need to define your assets, in the form of so called bundles, and register them with the environment. The easist way to do it is directly in code:
from webassets import Bundle js = Bundle('common/jquery.js', 'site/base.js', 'site/widgets.js', filters='jsmin', output='gen/packed.js') my_env.register('js_all', js)