Node.JS的CSS压缩器 clean-css

码农软件 · 软件分类 · Node.js 扩展 · 2019-04-16 20:28:17

软件介绍

clean-css 是一个非常简单的 CSS 压缩程序,可以删除 CSS 中一些无用的空格、评论以及每个选择器后面的分号等。

在命令行中的使用方法:

cleancss -o style.min.css style.css
cat theme.css feature1.css feature2.css feature3.css | cleancss -o features.css
cat theme.css feature1.css | cleancss | gzip -9 -c > feature1.css.gz

也可在 Node.js 中使用:

# Get the clean-css package
var cleanCSS = require('clean-css');

# Read in the source of a file or use hard-coded CSS...
var source = "body { color: red; font-weight: bold; }";

# Minify!
var minifiedCSS = cleanCSS.process(source);

本文地址:https://codercto.com/soft/d/3734.html

Realm of Racket

Realm of Racket

Matthias Felleisen、Conrad Barski M.D.、David Van Horn、Eight Students Northeastern University of / No Starch Press / 2013-6-25 / USD 39.95

Racket is the noble descendant of Lisp, a programming language renowned for its elegance and power. But while Racket retains the functional goodness of Lisp that makes programming purists drool, it wa......一起来看看 《Realm of Racket》 这本书的介绍吧!

URL 编码/解码
URL 编码/解码

URL 编码/解码

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具