LESS CSS on Windows

2019-03-08 10:36发布

Trying to set up LESS for CSS on my Windows box, I've installed ruby and rubygems and followed the instructions exactly.

I have put teststyle.less in C:\.
When I type

lessc teststyle.less

to compile it into a .css file, I get an error:

The filename, directory name, or volume label syntax is incorrect.

Out of those familiar with LESS, do any of you have a solution to my problem?
Did I mess up the install?

9条回答
啃猪蹄的小仙女
2楼-- · 2019-03-08 11:01

Only this https://github.com/leafo/lessphp PHP compiler didn't crashed with my crazy project structure with CSS imports in LESS, etc.

Very simple shell command for compiling LESS to CSS:

plessc input.less > output.css
查看更多
兄弟一词,经得起流年.
3楼-- · 2019-03-08 11:13

You can use Prepros App for windows. It can compile less, sass, jade, stylus, markdown, coffeescript and haml with live browser refresh.

查看更多
▲ chillily
4楼-- · 2019-03-08 11:16

I think I found the problem. In my first installation I installed to C:\Program Files\Ruby so I uninstalled and tried the default 'C:\Ruby' install path. Seems to fix the problem and it now works correctly. Thanks.

查看更多
登录 后发表回答