From: GoalSmashers Date: Sat, 8 Dec 2012 13:57:38 +0000 (+0000) Subject: Minor tweaks (by @XhmikosR). X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=af154a426bb3526ed122e58c56feeb4ff7d7356f;p=clean-css.git Minor tweaks (by @XhmikosR). --- diff --git a/.jshintrc b/.jshintrc index d233bc3d..37b4fe3a 100644 --- a/.jshintrc +++ b/.jshintrc @@ -11,6 +11,6 @@ "plusplus": false, "regexp": false, "strict": false, - "trailing": false, + "trailing": true, "unused": true } diff --git a/Makefile b/Makefile index 27fec289..6092b989 100644 --- a/Makefile +++ b/Makefile @@ -5,11 +5,11 @@ JSHINT = ./node_modules/.bin/jshint all: test test: - @@echo "Running all tests via vows" + @@echo "Running all tests via vows..." @@${VOWS} ${TEST_DIR}/*-test.js bench: - @@echo "Running benchmark on big.css file" + @@echo "Running benchmark on big.css file..." @@node test/bench.js check: diff --git a/README.md b/README.md index ee95c58c..3ffd53d9 100644 --- a/README.md +++ b/README.md @@ -28,11 +28,15 @@ More likely you would like to concatenate couple files like this (if you are on cat one.css two.css three.css | cleancss -o merged-and-minified.css +or on Windows: + + type one.css two.css three.css | cleancss -o merged-and-minified.css + Or even gzip the result at once: cat one.css two.css three.css | cleancss | gzip -9 -c > merged-minified-and-gzipped.css.gz -### How to use clean-css programatically? ### +### How to use clean-css programmatically? ### var cleanCSS = require('clean-css'); var source = "a{font-weight:bold;}"; @@ -40,7 +44,7 @@ Or even gzip the result at once: Process method accepts a hash as a second parameter (i.e. `cleanCSS.process(source, options)`), with the following options available: -* `keepSpecialComments` - `*` for keeping all, `1` for keeping first one, `0` for removing all (default is `*`) +* `keepSpecialComments` - `*` for keeping all (default), `1` for keeping first one, `0` for removing all * `keepBreaks` - whether to keep line breaks (default is false) * `removeEmpty` - whether to remove empty elements (default is false) * `debug` - turns on debug mode (measuring time spent on cleaning up - run `make bench` to see example) @@ -61,14 +65,14 @@ First clone the source, then run: on *nix systems. If you are under Windows then run: - ./test.bat + test.bat ## Acknowledgments ## * Vincent Voyer (@vvo) for a patch with better empty element regex and for inspiring us to do many performance improvements in 0.4 release. * Isaac (@facelessuser) for pointing out a flaw in clean-css' stateless mode. * Jan Michael Alonzo (@jmalonzo) for a patch removing node's old 'sys' package. -* @XhmikosR for suggesting new features (option to remove special comments and strip out url's parentheses) and pointing out numerous improvement (JSHint, media queries). +* @XhmikosR for suggesting new features (option to remove special comments and strip out urls quotation) and pointing out numerous improvements (JSHint, media queries). ## License ## diff --git a/test.bat b/test.bat index 26c924cd..a1770b62 100644 --- a/test.bat +++ b/test.bat @@ -3,3 +3,7 @@ pushd %~dp0 node .\node_modules\vows\bin\vows test\batch-test.js test\binary-test.js test\custom-test.js test\unit-test.js + +popd + +pause