Tirdad
Tirdad

Reputation: 51

grunt-contrib-compass not work in npm

i had installed npm and grunt and then installed grunt-contrib-compass. but when i run grunt. i have this error

Running “compass:dist” (compass) task
Warning: not found: compass Use –force to continue.
Aborted due to warnings

and this my gruntfile.js

module.exports = function(grunt) {
grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    compass: {
        dist: {
            options: {
                sassDir: 'sass',
                cssDir: 'css'
            }
        }
    },
    watch: {
        css: {
            files: '**/*.scss',
            tasks: ['compass']
        }
    }
});
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default',['watch']);
}

Upvotes: 1

Views: 3186

Answers (1)

toby1kenobi
toby1kenobi

Reputation: 1701

You need to install the Compass Ruby gem, as detailed here. Basically you need to have installed Ruby, and then using that you can install the Compass gem and grunt-contrib-compass should work

Upvotes: 2

Related Questions