Comparing version 0.2.3 to 0.2.4
@@ -450,3 +450,3 @@ /** | ||
// restore preserved comments and strings | ||
for (i = 0, max = preservedTokens.length; i < max; i = i + 1) { | ||
for (var i = 0, max = preservedTokens.length; i < max; i = i + 1) { | ||
css = css.replace("___YUICSSMIN_PRESERVE_CANDIDATE_COMMENT_" + i + "___", preservedTokens[i]); | ||
@@ -453,0 +453,0 @@ } |
@@ -29,2 +29,4 @@ var fs = require('fs'), | ||
cfg.silent = !!cfg.silent; | ||
cfg.output = path.resolve(path.normalize(cfg.output)); | ||
@@ -163,3 +165,4 @@ | ||
config = self.config, | ||
file = config.target; | ||
file = config.target, | ||
report = {}; | ||
@@ -193,3 +196,7 @@ utils.log('start analyze file : ' + file, 'debug'); | ||
self.generateOutput(data); | ||
callback && callback(); | ||
report.imports = self.imports; | ||
report.target = self.config.target; | ||
report.output = self.config.output; | ||
callback && callback(null, report); | ||
}); | ||
@@ -196,0 +203,0 @@ }); |
{ | ||
"name":"css-combo", | ||
"version":"0.2.3", | ||
"version":"0.2.4", | ||
"description":"css module combo tool", | ||
@@ -5,0 +5,0 @@ "author":"Dorange <daxingplay@gmail.com>", |
@@ -13,3 +13,3 @@ var CssCombo = require('../lib/index'), | ||
compress: 0 | ||
}, function(e){ | ||
}, function(e, report){ | ||
if(e){ | ||
@@ -19,3 +19,14 @@ console.dir(e); | ||
console.log('success'); | ||
console.log('report'); | ||
console.log(report); | ||
if (report.target !== path.resolve(__dirname, 'css/test.source.css')) { | ||
throw new Error('report.target Error'); | ||
} | ||
if (report.output !== path.resolve(__dirname, 'css/test.combo.css')) { | ||
throw new Error('report.output Error'); | ||
} | ||
if (report.imports.length !== 5) { | ||
throw new Error('report.imports Error'); | ||
} | ||
} | ||
}); |
Sorry, the diff of this file is not supported yet
67844
16
1590