@@ -25,6 +25,7 @@ module.exports = function(grunt) {
2525 openInBrowser : false ,
2626 outputFilePath : 'color-palette.html' ,
2727 stylesDirectory : '.' ,
28+ excludedFiles : '/' ,
2829 templateLayoutPath : __dirname + '/../templates/layout.html' ,
2930 templateSwatchPath : __dirname + '/../templates/swatch.html' ,
3031 hoverColorFunction : palettable . defaultHoverColorFunction ,
@@ -42,31 +43,31 @@ module.exports = function(grunt) {
4243 var colors = [ ] ;
4344
4445 // Gather all $colors in our SCSS files
45- grunt . file . expand ( { cwd : options . stylesDirectory } , '**/*.scss' ) .
46- forEach ( function ( file ) {
47- palettable . parseSCSS (
48- grunt . file . read ( options . stylesDirectory + '/' + file ) ,
49- file ,
50- colors ) ;
51- } ) ;
46+ grunt . file . expand ( { cwd : options . stylesDirectory } , '**/*.scss' , '!' + options . excludedFiles ) .
47+ forEach ( function ( file ) {
48+ palettable . parseSCSS (
49+ grunt . file . read ( options . stylesDirectory + '/' + file ) ,
50+ file ,
51+ colors ) ;
52+ } ) ;
5253
5354 // Gather all $colors in our SCSS files
54- grunt . file . expand ( { cwd : options . stylesDirectory } , '**/*.sass' ) .
55- forEach ( function ( file ) {
56- palettable . parseSASS (
57- grunt . file . read ( options . stylesDirectory + '/' + file ) ,
58- file ,
59- colors ) ;
60- } ) ;
55+ grunt . file . expand ( { cwd : options . stylesDirectory } , '**/*.sass' , '!' + options . excludedFiles ) .
56+ forEach ( function ( file ) {
57+ palettable . parseSASS (
58+ grunt . file . read ( options . stylesDirectory + '/' + file ) ,
59+ file ,
60+ colors ) ;
61+ } ) ;
6162
6263 // Gather all $colors in our SCSS files
63- grunt . file . expand ( { cwd : options . stylesDirectory } , '**/*.styl' ) .
64- forEach ( function ( file ) {
65- palettable . parseStylus (
66- grunt . file . read ( options . stylesDirectory + '/' + file ) ,
67- file ,
68- colors ) ;
69- } ) ;
64+ grunt . file . expand ( { cwd : options . stylesDirectory } , '**/*.styl' , '!' + options . excludedFiles ) .
65+ forEach ( function ( file ) {
66+ palettable . parseStylus (
67+ grunt . file . read ( options . stylesDirectory + '/' + file ) ,
68+ file ,
69+ colors ) ;
70+ } ) ;
7071
7172 // Sort by hue
7273 colors = palettable . sortColors ( colors , options . colorSortFunction ) ;
0 commit comments