How do you use csslint from the command line?

I am new to Ubuntu, I will be the first to acknowledge this, but I need to integrate csslint into the CI build script, and I found the csslint site csslint useless. This gave me two csslint installation 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 searching one of them in a format that I know how to work in google groups, I found someone asking a similar question. The answer was that rhino is not a finished product that you install and run, but a library that you work with.

All I need to do is:

  • pass CSS files to csslint via bash using csslint args
  • get an answer back
  • evaluate whether the assembly should fail due to violations.

Anywhere you can find step-by-step instructions that include dependencies such as node or rhino ?

Thanks to everyone.

+7
source share
1 answer

I 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.

+7
source

All Articles