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