Commit d3dd06ae by Kálmán Viktor

circle: ignore bower components and static files in less watch

parent f3fa489d
...@@ -6,6 +6,7 @@ from django.core.management.base import BaseCommand ...@@ -6,6 +6,7 @@ from django.core.management.base import BaseCommand
from django.conf import settings from django.conf import settings
STATIC_FILES = u'--include-path={}'.format(':'.join(settings.STATICFILES_DIRS)) STATIC_FILES = u'--include-path={}'.format(':'.join(settings.STATICFILES_DIRS))
IGNORED_FOLDERS = ("static_collected", "bower_components", )
class LessUtils(object): class LessUtils(object):
...@@ -39,8 +40,7 @@ class LessUtils(object): ...@@ -39,8 +40,7 @@ class LessUtils(object):
continue continue
relpath = os.path.relpath(root, settings.SITE_ROOT) relpath = os.path.relpath(root, settings.SITE_ROOT)
if relpath.startswith(("static_collected", if relpath.startswith(IGNORED_FOLDERS):
"bower_components")):
continue continue
less_pathname = "%s/%s" % (root, f) less_pathname = "%s/%s" % (root, f)
...@@ -59,6 +59,10 @@ class LessUtils(object): ...@@ -59,6 +59,10 @@ class LessUtils(object):
if not event.name.endswith(".less"): if not event.name.endswith(".less"):
return return
relpath = os.path.relpath(event.pathname, settings.SITE_ROOT)
if relpath.startswith(IGNORED_FOLDERS):
return
css_pathname = LessUtils.less_path_to_css_path(event.pathname) css_pathname = LessUtils.less_path_to_css_path(event.pathname)
LessUtils.compile_less(event.pathname, css_pathname) LessUtils.compile_less(event.pathname, css_pathname)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment