在 win 7 上通过 ruby​​ 减少 css - 版本大于 1.2.21?

发布于 2024-12-01 10:14:45 字数 415 浏览 3 评论 0原文

有没有办法让任何 2.x 版本通过 Ruby 在 Windows 上运行?

我测试了通过gem list --remote --all less列出的所有版本

问题是我只能安装1.2.21版本,该版本不支持&更少的选择器。

所以我必须做

div {
    border: red;
}
div.blue {
    border: blue;
}

而不是

div {
     border: red;
     &.blue {
         border: blue;
     }
}

“这很烦人”...

非常感谢任何帮助。

问候,
下午

Is there a way to get any of the 2.x versions working via Ruby on Windows?

I tested all the versions listed via gem list --remote --all less

The problem is that I can only install the 1.2.21 version, which doesn't support the & less selector.

So i have to do

div {
    border: red;
}
div.blue {
    border: blue;
}

instead of

div {
     border: red;
     &.blue {
         border: blue;
     }
}

Which is quite annoying...

Any help greatly appreciated.

Regards,
PM

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

枯寂 2024-12-08 10:14:45

找到了一种方法(嗯,两种)并愿意分享。希望这对某人有帮助并节省他大量的搜索。

我要使用的是 node.js。仅为此使用 ruby​​,因此我使用哪一个并不重要。
那里有完美的描述: vertstudios.com/blog/less-app-windows-sorta 并且效果非常好。

在编辑他们的 less.js 一段时间以适应我的目录结构之后,它非常棒。它支持一切,输出缩小/压缩版本并具有手表功能。

另一种方法(不太方便)是使用 Windows 的 csript。 Christopher Bennage 的博客中进行了描述

Found a way (well, two) and would like to share. Hope this helps someone and saves him tons of searching.

The one I'm going with is using node.js. Would use ruby only for this, so it's irelevant which one I'll use.
It's perfectly described there: vertstudios.com/blog/less-app-windows-sorta and works like a charm.

After editing their less.js for a while to fit my dir structure it's brilliant. It supports everything, outputs minifed/compressed version and has a watch functionality.

Another way (which isn't as convenient) is using windows's csript. Described on Christopher Bennage's blog

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文