0

I encountered this snippet of code, can someone explain what does compass:server mean?

compass: {
  files: ['<%= config.src %>/styles/{,*/}*.{scss,sass}'],
  tasks: ['compass:server', 'autoprefixer']
},
Andy
  • 61,948
  • 13
  • 68
  • 95
Blake
  • 7,367
  • 19
  • 54
  • 80

1 Answers1

0

compass is the name of a Grunt task (compiling Sass to CSS using Compass), and server is the name of a subtask. So, an example from the documentation:

compass: {
  dist: {
    options: {
      sassDir: 'sass',
      cssDir: 'css',
      environment: 'production'
    }
  },
  dev: {
    options: {
      sassDir: 'sass',
      cssDir: 'css'
    }
  }
  server: {
    options: {
      sassDir: 'sass',
      cssDir: 'css'
    }
  }
}

Using this configuration you could choose to run the dist, dev or server subtasks (with associated options) with compass:dist, compass:dev or compass:server commands.

I use Grunt all the time in my development. It's worth checking out if you want to take some of the complexity out of a development workflow. The alternative is new kid on the block, Gulp.

Andy
  • 61,948
  • 13
  • 68
  • 95