I had the same problem with the following:
gulp.task('compass', function() { gulp.src(sassSources) .pipe(compass({ sass: 'components/sass', image: outputDir + '/images', style: sassStyle })) .on('error', gutil.log) .pipe(gulp.dest(outputDir + '/css')) .pipe(connect.reload()) });
Note that there is this sassStyle variable, which is conditionally defined in the next part of the code, where the node.js process.env process is the βobservingβ value of NODE_ENV, so we can switch between the production folder and the development folder:
env = process.env.NODE_ENV || 'development'; if (env ==='development') { outputDir = 'builds/development/'; sassStyle = 'expanded'; } else { outputDir = 'builds/production/'; sassStyle ='compressed'; }
This is not a trick, but an external config.rb file edited manually:
config_file: 'config.rb',
with this line in the file:
output_style = :compressed
For now, I just left these lines commented out in the file as a workaround.
I am using the following devDependencies:
"devDependencies": { "gulp": "^3.9.1", "gulp-browserify": "^0.5.1", "gulp-coffee": "^2.3.2", "gulp-compass": "^2.1.0", "gulp-concat": "^2.6.0", "gulp-connect": "^5.0.0", "gulp-util": "^3.0.7", "jquery": "^3.1.0", "mustache": "^2.2.1" }