LESS CSS on Windows

前端 未结 9 978
半阙折子戏
半阙折子戏 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 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

提交回复
热议问题