How can I suppress file or line reference such as the commented output line below when running compass compile and possibly keep --output-style exp
Nevermind, just figured it out. In config/compass.rb, set:
line_comments = false
This will suppress/remove the comments from the compiled css files.
Just to update previous answer, by Chase T.
For me this is not working anymore.
line_comments = false
should become
line_comments = 0
From command-line, try:
compass compile --no-line-comments
If you're using Grunt and grunt-contrib-compass, it's noLineComments: true, e.g.
module.exports = function (grunt) {
grunt.initConfig({
watch: {
src: {
files: ['**/*.scss', '**/*.php'],
tasks: ['compass:dev']
},
options: {
livereload: true
}
},
compass: {
dev: {
options: {
sassDir: 'sass',
cssDir: 'css',
imagesPath: 'img',
noLineComments: true,
outputStyle: 'compressed'
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
};
then run: grunt compass.