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:
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;}";
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)
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 ##