From 6b45099b6a277ecd7a57f2d2e632bf40af774879 Mon Sep 17 00:00:00 2001 From: killface Date: Mon, 16 May 2016 14:46:53 -0700 Subject: [PATCH] feat(SASSPlugin): Allow regexes to be passed to include/exclude certain file patterns Allow passing in cacheInclude and cacheExclude as options to the SASSPlugin, primarily so that filenames beginning with an underscore can be ignored during SASS/SCSS compilation, which is generally accepted to be a standard in SASS (http://sass-lang.com/guide#topic-4). These config values can be set in angular-cli-build.js thus: "sassCompiler": { "cacheExclude": [/\/_[^\/]+$/] } This arguably closes issue #558 (https://github.com/angular/angular-cli/issues/558) --- lib/broccoli/angular-broccoli-sass.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/broccoli/angular-broccoli-sass.js b/lib/broccoli/angular-broccoli-sass.js index 2ed356c120fc..9d0f5e35b82e 100644 --- a/lib/broccoli/angular-broccoli-sass.js +++ b/lib/broccoli/angular-broccoli-sass.js @@ -18,7 +18,8 @@ class SASSPlugin extends Plugin { options = options || {}; Plugin.call(this, inputNodes, { - cacheInclude: [/\.scss$/, /\.sass$/] + cacheInclude: options.cacheInclude || [/\.scss$/, /\.sass$/], + cacheExclude: options.cacheExclude || undefined }); this.options = options; }