question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom .csscomb.json doesn't work.

See original GitHub issue

I have kept .csscomb.json in the root.

This is the code I have in gulpfile.js which doesn’t work:

var gulp = require('gulp'),
sass = require('gulp-sass'),
csscomb = require('gulp-csscomb');

gulp.task('styles', function() {
    gulp.src('assets/sass/**/*.scss')
    .pipe(sass().on('error', sass.logError))
    .pipe(csscomb('.csscomb.json'))
    .pipe(gulp.dest('assets/css/'));
});

gulp.task('default', function() {
  // place code for your default task here
  gulp.watch('assets/sass/**/*.scss',['styles']);
});

Niether this works:

var gulp = require('gulp'),
sass = require('gulp-sass'),
csscomb = require('gulp-csscomb');

gulp.task('styles', function() {
    gulp.src('assets/sass/**/*.scss')
    .pipe(sass().on('error', sass.logError))
    .pipe(csscomb())
    .pipe(gulp.dest('assets/css/'));
});

gulp.task('default', function() {
  // place code for your default task here
  gulp.watch('assets/sass/**/*.scss',['styles']);
});

Nor this:

var gulp = require('gulp'),
sass = require('gulp-sass'),
csscomb = require('gulp-csscomb');

gulp.task('styles', function() {
    gulp.src('assets/sass/**/*.scss')
    .pipe(sass().on('error', sass.logError))
    .pipe(csscomb('./.csscomb.json'))
    .pipe(gulp.dest('assets/css/'));
});

gulp.task('default', function() {
  // place code for your default task here
  gulp.watch('assets/sass/**/*.scss',['styles']);
});

No matter what I do, It applies the default config.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
Paul-Humecommented, Feb 24, 2017

To fix this I’ve rolled back to use 3.0.2 and now all is working fine. This does really need fixing though.

0reactions
scoobster17commented, Oct 15, 2016

Realise this is an old issue but I’m having this issue even now, but it seems it is only on Windows. Trying the same code from the same repo on a mac works fine.

As @srahulprdxn says, neither of these two options work:

.pipe(csscomb())

or

.pipe(csscomb('./.csscomb.json'))

Looking at the source code I also tried the below to no avail:

.pipe(csscomb( { configPath: './.csscomb.json'  } ))
Read more comments on GitHub >

github_iconTop Results From Across the Web

Gulp.src Glob Won't Copy .csscomb.json File - Stack Overflow
I am trying to copy .csscomb.json over to my dest folder. Everything works and copies over, but the .csscomb.json does not. When I...
Read more >
CSScomb - Visual Studio Marketplace
Launch VS Code Quick Open ( Ctrl+P ), paste the following command, ... Custom configuration is fun and simple: just put .csscomb.json file ......
Read more >
CSScomb settings for Drupal (CSS formatting and sort tool)
CSScomb formats and sorts CSS properties in css, scss, sass or less files. An explanation of the options can be found at ...
Read more >
grunt-csscomb - npm Package Health Analysis - Snyk
Learn more about grunt-csscomb: package health score, popularity, security, ... A string value that is used to specify custom-csscomb.json file path.
Read more >
CSScomb - Package Control
Press ctrl + shift + c or open “Tools” menu and select “Run CSScomb”. Custom configuration. Custom configuration is fun and simple: just...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found