user1937021
user1937021

Reputation: 10801

Import compass into SCSS

How do I import compass into my SCSS so that I can make use of mixins etc.

I currently use grunt to generate my SCSS files, I'm not sure exactly how I could do this.

my watch task is as follows:

module.exports = {
   jade: {
      files: 'app/views/**/*.jade',
      tasks: ['jade']
    },
     css: {
        files: '**/*.scss',
        tasks: ['sass']
    }
}

and my sass task is:

module.exports = {
   dist: {

         files: [{
           expand: true,
           cwd: 'scss',
           src: ['**/*.scss'],
           dest: 'stylesheets',
           ext: '.css'
         }]
   }
 }

Thanks

Upvotes: 0

Views: 416

Answers (1)

Sonny Prince
Sonny Prince

Reputation: 1152

you can use the Compass Grunt Task found here:

https://github.com/gruntjs/grunt-contrib-compass

Here's the example usage from the git repo:

grunt.initConfig({
  compass: {                  // Task
    dist: {                   // Target
      options: {              // Target options
        sassDir: 'sass',
        cssDir: 'css',
        environment: 'production'
      }
    },
    dev: {                    // Another target
      options: {
        sassDir: 'sass',
        cssDir: 'css'
      }
    }
  }
});

grunt.loadNpmTasks('grunt-contrib-compass');

grunt.registerTask('default', ['jshint', 'compass']);

Upvotes: 1

Related Questions