fix: Include website.bundle.scss when compiling Website Theme
This commit is contained in:
parent
e20355c798
commit
3b1cb347ef
1 changed files with 9 additions and 7 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue