+++ /dev/null
-TEST_DIR = test
-VOWS = ./node_modules/.bin/vows
-JSHINT = ./node_modules/.bin/jshint
-
-all: test
-
-test:
- @@echo "Running all tests via vows..."
- @@${VOWS} ${TEST_DIR}/*-test.js
-
-bench:
- @@echo "Running benchmark on big.css file..."
- @@node test/bench.js
-
-check:
- @@echo "Running JSHint on all project files..."
- @@${JSHINT} .
-
-.PHONY: all test bench check
\ No newline at end of file
npm install clean-css
-### How to use clean-css? ###
+### How to use clean-css CLI? ###
To minify a **public.css** file into **public-min.css** do:
cat one.css two.css three.css | cleancss | gzip -9 -c > merged-minified-and-gzipped.css.gz
### How to use clean-css programmatically? ###
+
```javascript
var cleanCSS = require('clean-css');
var source = "a{font-weight:bold;}";
var minimized = cleanCSS.process(source);
```
+
Process method accepts a hash as a second parameter (i.e. `cleanCSS.process(source, options)`), with the following options available:
* `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)
+* `debug` - turns on debug mode (measuring time spent on cleaning up - run `npm run bench` to see example)
+
+### What are the clean-css' dev commands? ###
+
+First clone the source, then run:
+
+* `npm run bench` for clean-css benchmarks (see test/bench,js for details)
+* `npm run check` to check JS sources with JSHint
+* `npm test` for the test suite
### How do you preserve a comment block? ###
Important comments included in minified output.
*/
-### How to run clean-css tests? ###
-
-First clone the source, then run:
-
- npm test
-
-on *nix systems. If you are under Windows then run:
-
- test.bat
## Acknowledgments ##
"cleancss": "./bin/cleancss"
},
"scripts": {
- "test": "node_modules/.bin/vows test/*-test.js"
+ "bench": "node test/bench.js",
+ "check": "jshint .",
+ "prepublish": "jshint .",
+ "test": "vows"
},
"dependencies": {
"optimist": "0.3.x"