From a4d19bf32afd949bef99c4ca39677168b2f3f560 Mon Sep 17 00:00:00 2001 From: Fluffy-Bean <michal-gdula@protonmail.com> Date: Mon, 3 Apr 2023 22:49:28 +0000 Subject: [PATCH] recompile sass when a file is updated --- gallery/__init__.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gallery/__init__.py b/gallery/__init__.py index 58e5150..280e6ba 100644 --- a/gallery/__init__.py +++ b/gallery/__init__.py @@ -80,10 +80,9 @@ def create_app(test_config=None): msg='You are not authorized to view this page!!!!'), 401 # Load JS assets - # TODO: disable caching for sass files as it makes it hard to work on when it is enabled - assets.register('js_pre', Bundle('js/pre/*.js', output='gen/pre_packed.js')) - assets.register('js_post', Bundle('js/post/*.js', output='gen/post_packed.js')) - assets.register('styles', Bundle('sass/*.sass', filters='libsass', output='gen/styles.css')) + assets.register('js_pre', Bundle('js/pre/*.js', output='gen/pre_packed.js', depends='js/pre/*.js')) + assets.register('js_post', Bundle('js/post/*.js', output='gen/post_packed.js', depends='js/pre/*.js')) + assets.register('styles', Bundle('sass/*.sass', filters='libsass', output='gen/styles.css', depends='sass/**/*.sass')) # Error handlers, if the error is not a HTTP error, return 500 @app.errorhandler(Exception)