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']
},
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']
},
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.