如何使用客户端less.js导出缩小的CSS文件?

时间:2021-11-03 16:21:02

I have a web project I'm working on and it is using LESS to combine all the files into one CSS for me. However I obviously don't want the client side javascript to have to run in production as that is going to slow things down.

我有一个正在研究的Web项目,它正在使用LESS将所有文件合并到一个CSS中。但是我显然不希望客户端javascript必须在生产中运行,因为这会减慢速度。

Is there a way with the client-side less.js that it can export the .less files you give it to a single CSS file, which I could then call in my live environment?

有没有办法与客户端less.js,它可以导出您提供给它的单个CSS文件的.less文件,然后我可以在我的实时环境中调用它?

2 个解决方案

#1


2  

You have a couple of options for this that I know of:

我知道有几种选择:

  1. Use the LESS command line tool
  2. 使用LESS命令行工具
  3. If you're on a Mac, use LESS.app
  4. 如果您使用的是Mac,请使用LESS.app

Running a watch command isn't that big of a deal, it becomes second nature quite quickly :)

运行watch命令并不是什么大不了的事情,它很快成为第二天性:)

#2


0  

Since you want a non-command line option, I'd recommend LESS.app if you're running OS X. If not, try Simpless (cross-platform) or Crunch (Adobe Air-based).

由于您需要非命令行选项,如果您正在运行OS X,我建议使用LESS.app。如果没有,请尝试使用Simpless(跨平台)或Crunch(基于Adobe Air)。

PS. They're all free!

PS。他们都是免费的!

#1


2  

You have a couple of options for this that I know of:

我知道有几种选择:

  1. Use the LESS command line tool
  2. 使用LESS命令行工具
  3. If you're on a Mac, use LESS.app
  4. 如果您使用的是Mac,请使用LESS.app

Running a watch command isn't that big of a deal, it becomes second nature quite quickly :)

运行watch命令并不是什么大不了的事情,它很快成为第二天性:)

#2


0  

Since you want a non-command line option, I'd recommend LESS.app if you're running OS X. If not, try Simpless (cross-platform) or Crunch (Adobe Air-based).

由于您需要非命令行选项,如果您正在运行OS X,我建议使用LESS.app。如果没有,请尝试使用Simpless(跨平台)或Crunch(基于Adobe Air)。

PS. They're all free!

PS。他们都是免费的!