From 9989371707981c95f74c13e35539bbe9e0f5edae Mon Sep 17 00:00:00 2001 From: Guilhem MAS-PAITRAULT Date: Tue, 7 Jul 2015 11:54:08 +0200 Subject: [PATCH 1/3] [Quickfix]Added rules to discover `.sass` files when compiling directories --- sass.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sass.py b/sass.py index a140d7e9..260c7ce9 100644 --- a/sass.py +++ b/sass.py @@ -150,13 +150,14 @@ def compile_dirname( for dirpath, _, filenames in os.walk(search_path): filenames = [ filename for filename in filenames - if filename.endswith('.scss') and not filename.startswith('_') + if filename.endswith('.scss') or filename.endswith('.sass') + and not filename.startswith('_') ] for filename in filenames: input_filename = os.path.join(dirpath, filename) relpath_to_file = os.path.relpath(input_filename, search_path) output_filename = os.path.join(output_path, relpath_to_file) - output_filename = re.sub('.scss$', '.css', output_filename) + output_filename = re.sub('.s[ac]ss$', '.css', output_filename) input_filename = input_filename.encode(fs_encoding) s, v, _ = compile_filename( input_filename, output_style, source_comments, include_paths, From ca385fd64ee1aea4820b4eff5e1a0a0b3a98dfef Mon Sep 17 00:00:00 2001 From: Guilhem MAS-PAITRAULT Date: Tue, 7 Jul 2015 12:23:58 +0200 Subject: [PATCH 2/3] Corrected condition on line 153, stupid me --- sass.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sass.py b/sass.py index 260c7ce9..7902de94 100644 --- a/sass.py +++ b/sass.py @@ -150,7 +150,7 @@ def compile_dirname( for dirpath, _, filenames in os.walk(search_path): filenames = [ filename for filename in filenames - if filename.endswith('.scss') or filename.endswith('.sass') + if (filename.endswith('.scss') or filename.endswith('.sass')) and not filename.startswith('_') ] for filename in filenames: From 18699d62be93b5e9d8914400d43f1768718f35df Mon Sep 17 00:00:00 2001 From: Guilhem MAS-PAITRAULT Date: Wed, 8 Jul 2015 09:43:12 +0200 Subject: [PATCH 3/3] [Update]Shortened condition as suggested --- sass.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sass.py b/sass.py index 7902de94..abca5073 100644 --- a/sass.py +++ b/sass.py @@ -150,7 +150,7 @@ def compile_dirname( for dirpath, _, filenames in os.walk(search_path): filenames = [ filename for filename in filenames - if (filename.endswith('.scss') or filename.endswith('.sass')) + if filename.endswith(('.scss', '.sass')) and not filename.startswith('_') ] for filename in filenames: