Skip to content

Grunt contrib compass is giving error - Individual stylesheets must be in the sass directory #254

@debo07

Description

@debo07

I have multiple sass files inside my assetsdirectory. I want to compile a different sass files for different target. I have used specifyoption but still it's showing the error that - 'Individual stylesheets must be in the sass directory'. Below is my grunt task for compass.

compass: {
  options: {
        sassDir: './src/assets',
        cssDir: '<%= build_dir %>/assets/',
        generatedImagesDir: '<%= build_dir %>/assets/images/generated',
        imagesDir: './src/assets/images',
        javascriptsDir: './src/scripts',
        fontsDir: './src/assets/fonts',
        importPath: './vendor',
        httpImagesPath: 'images',
        httpGeneratedImagesPath: 'images/generated',
        httpFontsPath: '<%= build_dir %>/assets/fonts',
        relativeAssets: false,
        assetCacheBuster: false,
        raw: 'Sass::Script::Number.precision = 10\n',
    },
    buildA: { // Target
        options: {
            outputStyle: 'expanded',
            specify: ['./src/assets/appA.scss']
        }
    },
    buildB: { // Target
        options: {
            outputStyle: 'expanded',
            specify: ['./src/assets/appB.scss']
        }
    }
}

What I want to achieve is when I execute grunt compass:buildA, it should compile only appA.scss file not appB.scss. And similarly for grunt compass:buildB it should only compile appB.scss. I hope you can figure out the directory structure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions