How do you use csslint from the command line?
Asked Answered
P

1

7

I'm new to Ubuntu, I'll be the first to admit that, but I need to integrate csslint into a CI build script and I found the about page on the csslint site unhelpful. It gave me two options for installing csslint but they require either node or rhino:

Node.js:
sudo npm install -g csslint

Rhino.js:
java -jar rhino.jar csslint-rhino.js --rules= ~ /* suppressed for simplicity */

After googling for either of these in a format I know how to work with, on google groups I found someone asking a similar question. The answer was that rhino is not a ready made product you install and run but a library you work with.

All I need to do is:

  • pass CSS files to csslint through bash with csslint args
  • get the response back
  • evaluate whether or not the build should fail due to violations

Is there anywhere I can find step-by-step instructions that include dependencies such as node or rhino?

Thanks everyone.

Pinko answered 5/11, 2012 at 14:44 Comment(0)
P
9

Found the answer myself and decided to put it here to help others.

sudo apt-get install npm

sudo npm install -g csslint

csslint pathtofile.css

have feelings hurt.

Proper answered 5/11, 2012 at 14:44 Comment(1)
Thanks Andy, wasn't sure if I could do that.Pinko

© 2022 - 2024 — McMap. All rights reserved.