LESS CSS on Windows

前端 未结 9 980
半阙折子戏
半阙折子戏 2021-01-30 17:28

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

相关标签:
9条回答
  • 2021-01-30 17:58

    I just started using Crunch to compile Bootstrap and its pretty awesome. Its built on Adobe Air, which you will have to install if you don't already have it.

    0 讨论(0)
  • 2021-01-30 18:00

    Edit:

    lessc does work on Windows now. See the Github page about commandline LESS tools for installation and usage instructions. The Github page with a list of LESS GUI tools might also be interesting.

    Original answer:

    The lessc command line tool for less.js doesn't work on Windows. If you want command line compiling of your LESS files you should check out this post.

    Also be sure to check out WinLess. WinLess is a compiler (with GUI) for LESS. WinLess can watch your LESS files, and automatically compile them when they have changed. If you are using Visual Studio for your projects you should also check out the BuildEventScript of winless.org.

    Be sure to check which compiler is being used when you are using different programs to compile your LESS code. If you are using programs which use different compilers you should watch out for interoperability issues (LESS code working correctly with one compiler, but not with another).

    0 讨论(0)
  • 2021-01-30 18:03

    If you don't want to use GUI to compile LESS on Windows, there is a clean way to get lessc command on Windows command line. It only requires you to install node.js, which is required by original lessc anyway.

    So, install node.js (http://nodejs.org/) and install "less" module for node.js. The latter provides lessc executable (lessc.cmd on Windows) as well, so you should only make sure it gets under your PATH in Windows.

    If you don't have node.js yet, here are step-by-step instructions:

    • Install node.js (http://nodejs.org/)
    • In new command-line, go to node.js installation directory (where node.exe is located), and execute > npm install less (make sure you do so from node.js installation directory only)
    • Latter downloads less module for node.js, as well as lessc.cmd to node_modules/.bin/ directory. Add this directory to PATH
    • Now, in new command line you may enjoy the use of lessc as usual

    Source: http://pragmatictim.blogspot.fr/2012/08/developing-with-less-on-windows-getting.html

    0 讨论(0)
提交回复
热议问题