好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

CleanCss

CleanCss 介绍

Clean-css 是 一个 非常简单的 css 压缩程序,基于Node.js环境开发使用,可以 删除 css 中一些无用的空格、 评论 以及每个选择器后面的分号,还可以压缩通过@import引入的css 文件 。

环境依赖

Node.js 4.0+ (tested on CentOS,Ubuntu,OS X,and Windows)

通过npm安装

npm install clean-css

如何使用命令行

Clean-css接受下列命令行参数,使用时请将需要优化的css 文件 <source-file>放置到最后 一个 参数后面,避免遇到潜在的不可预想的问题。

cleancss [options] source-file,[source-file,...]

-h,--help output usage informat ion

-v,--version output the version number

-b,--keep-line-breaks Keep line breaks

-c,--compatibility [ie7|ie8] Force compatibility mode (see Readme for advanced examples)

-d,--debug Shows debug informat ion (minification time & compression efficiency)

-o,--output [output-file] Use [output-file] as output instead of STDOUT

-r,--root [root-path] Set a root path to which resolve absolute @import rules

-s,--skip-import dis able @import processing

-t,--timeout [seconds] Per connection timeout when fetching remote @imports (defaults to 5 seconds)

--rounding-precision [n] Rounds to `N` decimal places. Defaults to 2. -1 dis ables rounding

--s0 Remove all special comments,i.e. /*! comment */

--s1 Remove all special comments but the f irs t one

--semantic-merging Enables unsafe mode by assuming BEM-like semantic stylesheets (warning,this may break your styling!)

--skip-advanced dis able advanced optimizations - ruleset reordering & merging

--skip-aggressive-merging dis able properties merging based on their order

--skip-import-from [rules] dis able @import processing for specified rules

--skip-media-merging dis able @media merging

--skip-rebase dis able URLs rebasing

--skip-restructuring dis able restructuring optimizations

--skip-shorthand-compacting dis able shorthand compacting

--source-map Enables building input's source map

--source-map-inline-sources Enables inlining sources inside source maps

网站地址 : https://jakubpawlowicz.github.io/clean-css/

GitHub: https://github.com/jakubpawlowicz/clean-css

网站描述: 基于Node.js的CSS 代码 压缩工具

CleanCss官方网站

官方网站: https://jakubpawlowicz.github.io/clean-css/

如果觉得 网站内容还不错,欢迎将 网站 推荐给程序员好友。

查看更多关于CleanCss的详细内容...

  阅读:38次

上一篇

下一篇

第1节:Basscss    第2节:sandal    第3节:CssLoad    第4节:tachyons    第5节:CssDeck    第6节:Pure.css    第7节:typebase.css    第8节:FOX CSS    第9节:Normalize.css    第10节:csscss    第11节:flex-layout-attribute    第12节:css-loaders    第13节:stylelint    第14节:CleanCss    第15节:text-spinners    第16节:CssStats    第17节:EnjoyCSS    第18节:SpinKit    第19节:Shoelace.css    第20节:Core.css    第21节:Yoga    第22节:CssComb    第23节:CSS 揭秘    第24节:cssnano    第25节:CSSgram    第26节:imagehover.css    第27节:Biomatic UI    第28节:Devices.css    第29节:colors.css    第30节:Styled-Component    第31节:CSS Gradient Generator    第32节:polished    第33节:Milligram    第34节:microtip    第35节:CrookedStyleSheets    第36节:NES.css    第37节:CssDig    第38节:wing    第39节:NEC    第40节:Emmet LiveStyle    第41节:cssfx    第42节:csshake    第43节:BearCss    第44节:stylus    第45节:minireset.css    第46节:Effeckt.css    第47节:Hover Buttons    第48节:family.scss    第49节:CSSPeeper    第50节:css-loader    第51节:animista    第52节:CSS Inspiration    第53节:Titanic    第54节:epic-spinners    第55节:github-markdown-css    第56节:Picnic CSS    第57节:Siimple    第58节:Grabient    第59节:Critical    第60节:css3d-engine    第61节:vivify    第62节:css-doodle    第63节:Pleeease    第64节:CSS-Tricks    第65节:topcoat    第66节:CssNext    第67节:balloon.css    第68节:CSS-Inspiration    第69节:sass    第70节:open-color    第71节:hover    第72节:hotcss    第73节:ScrollDir    第74节:Obnoxious.CSS    第75节:css-blocks    第76节:Buttons    第77节:Choreographer-js    第78节:Gumby    第79节:LostGrid    第80节:water.css    第81节:magicCss    第82节:postcss    第83节:CSS Modules    第84节:Spectre.css    第85节:a11y.css    第86节:AniJS    第87节:uncss    第88节:Photon    第89节:kissui.scrollanim    第90节:Blaze UI    第91节:Hint.css    第92节:csso    第93节:stylefmt    第94节:CssPiffle    第95节:CJSS    第96节:css-animation-101    第97节:mini.css    第98节:magic    第99节:flexboxgrid    第100节:tailwindcss    第101节:css-modal    第102节:CssMatic    第103节:DropCSS    第104节:Repaintless.css    第105节:Wenk    第106节:tacit    第107节:HTML-KickStart    第108节:Css3Maker    第109节:Metro UI    第110节:min.css