From 3b1cb347ef8ce9e620cb86bdc804cda2799253f0 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Thu, 29 Apr 2021 11:36:18 +0530 Subject: [PATCH] fix: Include website.bundle.scss when compiling Website Theme --- .../doctype/website_theme/website_theme.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/frappe/website/doctype/website_theme/website_theme.py b/frappe/website/doctype/website_theme/website_theme.py index a2757ca154..dbc54782e1 100644 --- a/frappe/website/doctype/website_theme/website_theme.py +++ b/frappe/website/doctype/website_theme/website_theme.py @@ -156,18 +156,20 @@ def get_scss_paths(): """ Return a set of SCSS import paths from all apps that provide `website.scss`. - If `$BENCH_PATH/apps/frappe/frappe/public/scss/website.scss` exists, the - returned set will contain 'frappe/public/scss/website'. + If `$BENCH_PATH/apps/frappe/frappe/public/scss/website[.bundle].scss` exists, the + returned set will contain 'frappe/public/scss/website[.bundle]'. """ import_path_list = [] bench_path = frappe.utils.get_bench_path() + scss_files = ['public/scss/website.scss', 'public/scss/website.bundle.scss'] for app in frappe.get_installed_apps(): - relative_path = join_path(app, 'public/scss/website.scss') - full_path = get_path('apps', app, relative_path, base=bench_path) - if path_exists(full_path): - import_path = splitext(relative_path)[0] - import_path_list.append(import_path) + for scss_file in scss_files: + relative_path = join_path(app, scss_file) + full_path = get_path('apps', app, relative_path, base=bench_path) + if path_exists(full_path): + import_path = splitext(relative_path)[0] + import_path_list.append(import_path) return import_path_list