Reputation: 11706
How can I suppress file or line reference such as the commented output line below when running compass compile
and possibly keep --output-style
expanded by default?
/* line 85, ../../../app/stylesheets/simpla/style.sass */
.align-right {
float: right;
}
The problem is whenever I make 1 line change in sass, it makes 50+ line changes to my css to update all the reference line numbers that got adjusted. This makes it really hard to read the actual changes in my git commit.
Upvotes: 6
Views: 3920
Reputation: 166359
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
.
Upvotes: 0
Reputation: 558
Just to update previous answer, by Chase T.
For me this is not working anymore.
line_comments = false
should become
line_comments = 0
Upvotes: 0
Reputation: 11706
Nevermind, just figured it out. In config/compass.rb, set:
line_comments = false
This will suppress/remove the comments from the compiled css files.
Upvotes: 11