gruntjs / grunt-contrib-compass

Compile Compass to CSS.
http://gruntjs.com/
MIT License
626 stars 128 forks source link

ImportPath has capability to ** all sub directories #239

Closed adriaanbalt closed 8 years ago

adriaanbalt commented 9 years ago

I have a dynamic number of sub folders, it's components that will be added over time by multiple developers. I don't want to have to include each sub folder component in this GruntFile. Is there a work around?

sindresorhus commented 9 years ago

ImportPath has capability to \ all sub directories

What exactly do you mean by that? What are you asking?

adriaanbalt commented 9 years ago

Here is a look at the compass portion of my GruntFile

compass: {
            dist: {
                options: {
                    sassDir: '<%= pkg.paths.page.scss %>',
                    cssDir: '<%= pkg.directory.dest %>/assets/css',
                    imagesDir: '<%= pkg.directory.dest %>/assets/images',
                    javascriptDir: '<%= pkg.directory.dest %>/assets/js',
                    fontsDir: '<%= pkg.directory.dest %>/assets/fonts',
                    relativeAssets: false,
                    outputStyle: 'expanded',
          importPath: '<%= pkg.paths.global.scss %>' // Compass will also look at the global scss file directory
                }
            }
       },

I would like the importPath to be more like this: importPath: '<%= pkg.paths.global.scss %>/**/scss'

Note the ** at the end would designate all sub directories and their relative scss folders. I get the following error:

Running "compass:dist" (compass) task
Errno::ENOENT on line ["33"] of /Users/you/.rvm/gems/ruby-2.1.1/gems/compass-1.0.3/lib/compass/exec/global_options_parser.rb: No such file or directory @ realpath_rec - /project/global/scss/**
sindresorhus commented 9 years ago

Does that work with normal Compass? Keep in mind that this task is only a thin wrapper above the compass CLI.