gruntjs / grunt-contrib-compass

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

'specify' option refers to stylesheet location in sass directory #228

Closed arnalyse closed 9 years ago

arnalyse commented 9 years ago

I hope somebody here can enlighten me in any way regarding the 'specify:' option.

What I'm trying to achieve is the following:

I want to create a separate task, to only compile a subset of my .sass files.

The directory structure is as follows:

project-directory
|- sass
    |- subfolder a
    |- subfolder b
        |- modules
            |- …
        |- screen.sass
        |- all-old-ie.sass

When I'm developing, I just want to compile the screen.sass, not the all-old-ie.sass

Therefore, my gruntfile contains the following:

// compile sass code
compass: {
    // general options
    options: {
        bundleExec: true,
        cssDir: project.codeDir + 'css',
        fontsPath: project.codeDir + 'fonts',
        httpPath: '/',
        imagesPath: project.codeDir + 'img',
        javascriptsPath: project.codeDir + 'js',
        sassDir: project.sourceDir + 'sass',
        raw: 'preferred_syntax=:sass\n'
    },
    dev: {
        options: {
            sourcemap: true,
            environment: 'development',
            outputStyle: 'expanded'
        }
    },
    'dev-no-ie': {
        options: {
            sourcemap: true,
            environment: 'development',
            outputStyle: 'expanded',
            specify: '**/screen.sass'
        }
    },
    dist: {
        options: {
            force: true,
            environment: 'production',
            outputStyle: 'compressed'
        }
    }
}

the error message:

when trying to compile It only states:

Individual stylesheets must be in the sass directory.

I tried different patterns in the specify option, but as of now, it seems that files are found matching the pattern, but the error message does not enlighten me as much as I would hope. Because, the screen.sass resides in a subfolder of the sassDir.


Anyway, I hope someone can help me or point me to a solution, or tell me if it's actually a bug. Thanks a lot for your time, any help is greatly appreciated.

sindresorhus commented 9 years ago

Duplicate of https://github.com/gruntjs/grunt-contrib-compass/issues/223