Renames `debug` into `benchmark` for transformation benchmarking to avoid confusion...
authorGoalSmashers <jakub@goalsmashers.com>
Thu, 5 Sep 2013 08:50:36 +0000 (10:50 +0200)
committerGoalSmashers <jakub@goalsmashers.com>
Thu, 5 Sep 2013 09:39:34 +0000 (11:39 +0200)
History.md
README.md
lib/clean.js
test/bench.js

index 977f678..b2a4565 100644 (file)
@@ -9,6 +9,7 @@
 * Fixed issue [#129](https://github.com/GoalSmashers/clean-css/issues/129) - rebasing imported urls.
 * Fixed issue [#130](https://github.com/GoalSmashers/clean-css/issues/130) - better code modularity.
 * Fixed issue [#135](https://github.com/GoalSmashers/clean-css/issues/135) - require node.js 0.8+.
+* Renamed lib's `debug` option to `benchmark` when doing per-minification benchmarking.
 
 1.0.12 / 2013-07-19
 ===================
index e7dd7b5..ff321ab 100644 (file)
--- a/README.md
+++ b/README.md
@@ -90,7 +90,7 @@ Process method accepts a hash as a second parameter, i.e.,
 * `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
+* `benchmark` - turns on benchmarking mode measuring time spent on cleaning up
   (run `npm run bench` to see example)
 * `root` - path to resolve absolute `@import` rules and rebase relative URLs
 * `relativeTo` - path with which to resolve relative `@import` rules and URLs
index bb04792..20bb693 100644 (file)
@@ -38,7 +38,7 @@ var CleanCSS = {
       options.processImport = true;
 
     // replace function
-    if (options.debug) {
+    if (options.benchmark) {
       var originalReplace = replace;
       replace = function(pattern, replacement) {
         var name = typeof pattern == 'function' ?
index 5fe1dd5..8b618d3 100644 (file)
@@ -7,7 +7,7 @@ if (!process.hrtime) {
 }
 
 var start = process.hrtime();
-cleanCSS.process(bigcss, { debug: true });
+cleanCSS.process(bigcss, { benchmark: true });
 
 var itTook = process.hrtime(start);
 console.log('complete minification: %d ms', 1000 * itTook[0] + itTook[1] / 1000000.0);