Kaynağa Gözat

fix: Include website.bundle.scss when compiling Website Theme

version-14
Faris Ansari 4 yıl önce
ebeveyn
işleme
3b1cb347ef
1 değiştirilmiş dosya ile 9 ekleme ve 7 silme
  1. +9
    -7
      frappe/website/doctype/website_theme/website_theme.py

+ 9
- 7
frappe/website/doctype/website_theme/website_theme.py Dosyayı Görüntüle

@@ -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



Yükleniyor…
İptal
Kaydet