如何在node.js和Windows之上安装和运行lessc? [英] How to install and run lessc on top of node.js and Windows?

查看:289
本文介绍了如何在node.js和Windows之上安装和运行lessc?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习LESS,我想在Windows 7上安装lessc.

Hi I am learning LESS and I would like to install lessc on my Windows 7.

遵循本教程 http://verekia.com/less-css/不要少读css教程上瘾

第一步是我下载并安装了node.js(node-v0.10.5-x64.msi).

The first step is I dowloaded and installed node.js (node-v0.10.5-x64.msi).

然后在控制台中,我跑了

Then in a console, I ran

npm install less -g

我得到了以下内容:

npm http GET https://registry.npmjs.org/less
npm http 304 https://registry.npmjs.org/less
npm http GET https://registry.npmjs.org/ycssmin
npm http 304 https://registry.npmjs.org/ycssmin
C:\Users\Me\AppData\Roaming\npm\lessc -> C:\Users\Me\AppData\Roaming\npm\node_modules\less\bin\lessc
less@1.3.3 C:\Users\Me\AppData\Roaming\npm\node_modules\less
+-- ycssmin@1.0.1

然后我在同一控制台中运行以下命令:

Then I ran the following in the same console:

lessc style.less > style.css

但是我知道了

"lessc"未被识别为内部或外部命令,可操作程序或批处理文件.

'lessc' is not recognized as an internal or external command, operable program or batch file.

我不确定我哪里做错了.我用谷歌搜索,但似乎有太多的东西,不确定哪一个是正确的.做过很多测试都没有成功.

I am not sure where I got wrong. I googled but it seems there is too much stuff, not sure which one is right. Did many tests without any success.

有人可以告诉我怎么做,或者给我一个指向Windows的详细信息和最新安装信息的地方的指针吗?

Could someone tell me how to do it or give me a pointer to some place with detailed and latest install info for Windows?

推荐答案

在控制台中,运行以下命令:

In a console, run the following:

node C:\Users\Me\AppData\Roaming\npm\node_modules\less\bin\lessc style.less > style.css

style.less必须在控制台的目录中.

style.less must be in the console's directory.

这篇关于如何在node.js和Windows之上安装和运行lessc?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆