How to compile a compass without a link to a file or line?

How can I suppress a link to a file or line, for example, the specified output line below when running compass compile and possibly keep --output-style as default?

 /* line 85, ../../../app/stylesheets/simpla/style.sass */ .align-right { float: right; } 

The problem is that every time I make one line change in sass, it makes 50+ line changes in my CSS to update all the reference line numbers that have been adjusted. This really makes it difficult to read the actual changes in my git transaction.

+6
source share
3 answers

Nevermind, just figured it out. In config / compass.rb install:

 line_comments = false 

This will suppress / remove comments from compiled css files.

+11
source

Just update the previous answer, Chase T.

For me it no longer works.

 line_comments = false 

should become

 line_comments = 0 
0
source

From the command line try:

 compass compile --no-line-comments 

If you use Grunt and grunt-contrib-compass , then noLineComments: true , for example

 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 do: grunt compass .

0
source

All Articles