release 1.0.4

This commit is contained in:
rozbo 2016-06-22 19:35:26 +08:00
parent 76b0dcae08
commit fa1b1b685e
2 changed files with 4 additions and 7 deletions

View File

@ -28,10 +28,7 @@ function logic_html(str, data) {
var result = Htmlminifier(str, options);
var saved = ((str.length - result.length) / str.length * 100).toFixed(2);
log.log('neat the html: %s [ %s saved]', path, saved + '%');
var now = new Date();
// var prefix='<!-- build time:'+ now.getFullYear() +"年"+(now.getMonth() + 1)+"月"+now.getDate()+"日"
// +now.getHours()+":"+now.getMinutes()+":"
var prefix = '<!-- build time:' + now.toLocaleString() + " -->";
var prefix = '<!-- build time:' + Date() + " -->";
var end = '<!-- rebuild by neat -->';
result = prefix + result + end;
return result;
@ -58,7 +55,7 @@ function logic_css(str, data) {
new CleanCSS(options).minify(str, function(err, result) {
if (err) return reject(err);
var saved = ((str.length - result.styles.length) / str.length * 100).toFixed(2);
var prefix = '/* build time:' + new Date().toLocaleString() + "*/\n";
var prefix = '/* build time:' + Date().toLocaleString() + "*/\n";
var end = '\n/* rebuild by neat */';
var css_result = prefix + result.styles + end;
resolve(css_result);
@ -87,7 +84,7 @@ function logic_js(str, data) {
var result = UglifyJS.minify(str, options);
var saved = ((str.length - result.code.length) / str.length * 100).toFixed(2);
log.log('neat the js: %s [ %s saved]', path, saved + '%');
var prefix = '// build time:' + new Date().toLocaleString() + "\n";
var prefix = '// build time:' + Date().toLocaleString() + "\n";
var end = '\n//rebuild by neat ';
var js_result = prefix + result.code + end;
return js_result;

View File

@ -33,5 +33,5 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"version": "1.0.3"
"version": "1.0.4"
}