X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Ftools%2Fdash%2Fapp%2Fpal%2Fassets.py;h=63fac163339ae5309ce1b91f945fccae9436868e;hb=efddc84171ee1335d193bac15644a0419ef8c166;hp=42377077346bc19e825a56183a47f8684ec47d99;hpb=a5e8351152d9513811e2d6d9eaaf2180e35e002d;p=csit.git diff --git a/resources/tools/dash/app/pal/assets.py b/resources/tools/dash/app/pal/assets.py index 4237707734..63fac16333 100644 --- a/resources/tools/dash/app/pal/assets.py +++ b/resources/tools/dash/app/pal/assets.py @@ -11,7 +11,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Compile static assets.""" +"""Compile static assets. +""" + from flask import current_app as app from flask_assets import Bundle @@ -24,15 +26,17 @@ def compile_static_assets(assets): :returns: Compiled stylesheets. :rtype: Environment """ + assets.auto_build = True assets.debug = False less_bundle = Bundle( - "less/*.less", - filters="less,cssmin", - output="dist/css/styles.css", - extra={"rel": "stylesheet/less"}, + u"less/*.less", + filters=u"less,cssmin", + output=u"dist/css/styles.css", + extra={u"rel": u"stylesheet/less"}, ) - assets.register("less_all", less_bundle) - if app.config["FLASK_ENV"] == "development": + assets.register(u"less_all", less_bundle) + if app.config[u"FLASK_ENV"] == u"development": less_bundle.build() + return assets