You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the parameter "load_external_files" is empty, traverse the folder and look for all the files specified in "css_extension".
Modify the file: project.py for the following(By default(implemented functionality, unaffected.), the css file in "link" is looked up in the HTML file.):
import sublime, glob, os
ST2 = int(sublime.version()) < 3000
if ST2:
import settings
else:
from . import settings
def get_all_files(path):
files = []
if not os.path.isdir(path):
raise
for x in os.listdir(path):
f = os.path.join(path, x)
if os.path.isdir(f):
files.extend(get_all_files(f))
else:
files.append(f)
return files
def get_external_files():
_load_external_files = settings.get('load_external_files', [])
_css_extension = settings.get('css_extension', [])
external_files = []
_tmp_files = []
if _load_external_files == []:
_load_external_files = sublime.active_window().folders()
if _css_extension == []:
_css_extension = ['.css', '.less', '.scss']
for _dir in _load_external_files:
_tmp_files.extend(get_all_files(_dir))
for _x in _tmp_files:
for _y in _css_extension:
if _x.endswith(_y):
external_files.append(_x)
else:
for file_path in _load_external_files:
external_files.extend(glob.glob(file_path))
print(external_files)
return external_files
The text was updated successfully, but these errors were encountered:
I like this extension a lot but as I have several css files on the pages it locks up the sublime, it gets all the css files and lock it has to sort it?
When the parameter "load_external_files" is empty, traverse the folder and look for all the files specified in "css_extension".
Modify the file: project.py for the following(By default(implemented functionality, unaffected.), the css file in "link" is looked up in the HTML file.):
The text was updated successfully, but these errors were encountered: