https://www.npmjs.com/package/gulp-compass

The above link says that the comments configuration option is defaulted to false. I tried to change my gulpfile.js to include the option and change it to true but my .css file still has no comments. Could you please show me what I need to do to include comments in my css file? I tried comments: true, comments: 'true', line_comments: true ('true'). Nothing has worked.

Here is the code I tried to change:

var gulp = require('gulp'),
    gutil = require('gulp-util'),
    coffee = require('gulp-coffee'),
    browserify = require('gulp-browserify'),
    compass = require('gulp-compass'),
    concat = require('gulp-concat');


var coffeeSources = ['components/coffee/*.coffee'];
var jsSources = [
    'components/scripts/rclick.js',
    'components/scripts/pixgrid.js',
    'components/scripts/tagline.js',
    'components/scripts/template.js'

];

var sassSources = ['components/sass/style.scss'];

gulp.task('coffee', function() {
    gulp.src(coffeeSources)
    .pipe(coffee({ bare: true })
      .on('error', gutil.log))
    .pipe(gulp.dest('components/scripts'))
});

gulp.task('js', function() {
    gulp.src(jsSources)
        .pipe(concat('script.js'))
        .pipe(browserify())
        .pipe(gulp.dest('builds/development/js'))

});

gulp.task('compass', function() {
    gulp.src(sassSources)
        .pipe(compass({
            sass: 'components/sass',
            image: 'builds/development/images',
            style: 'expanded',
            comments: 'true'
        }))
        .on('error', gutil.log)
        .pipe(gulp.dest('builds/development/css'))

});

Here is the outputted style.css sheet that still has no comments

body {
  background: #eddbba;
  font-family: "Inika", serif;
  font-size: 1.1em;
}

#content {
  color: #CC8E94;
  font-size: 2em;
}

.container {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}

Here is what it is supposed to look like

@import "http://fonts.googleapis.com/css?family=Patua+One|Inika";
/* line 3, ../components/sass/_base.scss */
body {
  background: #eddbba;
  font-family: "Inika", serif;
  font-size: 1.1em;
}

/* line 9, ../components/sass/_base.scss */
#content {
  color: #cc8e94;
  font-size: 2em;
}

/* line 14, ../components/sass/_base.scss */
.container {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}
1

There are 1 best solutions below

0
On

I had to delete the style.css that the gulp.task already created and redo the gulp compass task in git bash.smh :( (I spent a lot of time trying to figure out why this wasn't working lol)