csscomb.js icon indicating copy to clipboard operation
csscomb.js copied to clipboard

parsing output from csscomb

Open AbdealiLoKo opened this issue 9 years ago • 5 comments

Hi,

Im trying to use csscomb and parse the output so that i can detect the line changes (before applying it). I was looking for some way to get the fixed file from csscomb through stdout.

Couldn't find any method to do that - could you help me out ?

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

AbdealiLoKo avatar Feb 16 '16 00:02 AbdealiLoKo

I was just about to post this. Thanks for posting it @AbdealiJK :+1:

To the owners/contributors:

Basically as AbdealiJK mentioned we're looking for getting the output of csscomb over a specific file as the stdout. At the same time it'd be greater to make the error messages more easily parsable in case there's a syntax error in the css file. As of now it abruptly flags an error in -v and without -v it runs csscomb over the file but doesn't make any changes.

Tracking issue: https://github.com/coala-analyzer/coala/issues/1398

sudheesh001 avatar Feb 16 '16 04:02 sudheesh001

@AbdealiJK This is not possible with the current code base. However you can use the Node.js interface comb.processString to get the expected output without changing the file.

haoqunjiang avatar Feb 16 '16 06:02 haoqunjiang

@sudheesh001 I'd surely like to add this feature to csscomb. But for now I am busy fixing bugs.

Might be able to begin dealing with this feature in a month or two. And any help would be appreciated :smile:

haoqunjiang avatar Feb 16 '16 06:02 haoqunjiang

Actually, if you pass not a file name but file content to csscomb via stdin, it should output the result to stdout: https://github.com/csscomb/csscomb.js/blob/dev/src/cli.js#L29 Though I believe stdin may be a bit broken right now: #351

(I'm going through mail in reverse date order, so sorry for replying to PR first :octopus:)

tonyganch avatar Feb 16 '16 11:02 tonyganch

Hi, I am trying to achieve the same and i have been unsuccessful so far! :disappointed: If there is any update on this it would be a great help. Thank You. :smile:

atb00ker avatar Sep 07 '18 08:09 atb00ker