![](/img/trans.png)
[英]How do I install and use the custom CSSLint rules I have written for the CLI?
[英]How do you use csslint from the command line?
我是Ubuntu的新手,我是第一個承認這一點的人,但是我需要將csslint
集成到CI構建腳本中,我發現csslint
網站上的about頁面無益。 它為我提供了兩個安裝csslint
選項,但它們需要node
或rhino
:
Node.js:
sudo npm install -g csslint
Rhino.js:
java -jar rhino.jar csslint-rhino.js --rules= ~ /* suppressed for simplicity */
在我知道如何使用的格式上搜索其中任何一種后,在谷歌群組中我發現有人問了類似的問題。 答案是, rhino
不是您安裝和運行的現成產品,而是您使用的庫。
我需要做的就是:
csslint
args通過bash將CSS文件傳遞給csslint
有什么地方我可以找到包含node
或rhino
等依賴項的分步說明嗎?
感謝大家。
我自己找到了答案,並決定把它放在這里幫助別人。
sudo apt-get install npm
sudo npm install -g csslint
csslint pathtofile.css
有感情受傷。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.