从LESS中获取最小化的CSS输出的最佳方法是什么? [英] What is the best way to get minified CSS output from LESS?

查看:55
本文介绍了从LESS中获取最小化的CSS输出的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以从LESS中自动获取缩小的已编译CSS?每次更改内容时,都必须手动对其进行压缩.

Is it possible to get minified compiled CSS from LESS automatically? Every time I change something, I have to manually compress it.

我使用less.js来编译LESS.

I use less.js to compile LESS.

谢谢.

推荐答案

$ lessc styles.less -x compress命令已被弃用.

$ lessc styles.less -x The compress command has been deprecated.

您将必须使用此命令 $ lessc -clean-css style.lessstyle.min.css

在使用上述命令之前,您必须使用以下命令安装 less-plugin-clean-css

before use above command you've to install less-plugin-clean-css using below command

$ npm install less-plugin-clean-css -g

这篇关于从LESS中获取最小化的CSS输出的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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