fixed bug with minifying, if file do not minimized so allowed set to none

This commit is contained in:
coderaiser 2012-10-01 06:16:25 -04:00
parent dc35575027
commit b2baf5ec0c
3 changed files with 10 additions and 3 deletions

View file

@ -78,6 +78,8 @@ disabled in browsers.
* Little bit changed styles. Fixed margins in responsive view.
* Fixed bug with minifying, if file do not minimized so allowed set to none.
2012.08.24, Version 0.1.6

View file

@ -88,7 +88,7 @@ exports.Minify = {
*/
setAllowed :(function(pAllowed){
if(pAllowed){
this._allowed=pAllowed;
this._allowed = pAllowed;
}
}),
@ -105,9 +105,12 @@ exports.Minify = {
lMinify = require('minify');
}catch(pError){
this._allowed = {js:false,css:false,html:false};
return console.log('You coud install minify ' +
console.log('You coud install minify ' +
'for better download spead:\n' +
'npm i minify');
return this._allowed;
}
/*
@ -143,6 +146,8 @@ exports.Minify = {
lMinify.optimize(lOptimizeParams);
this.Cache = lMinify.Cache;
return this._allowed;
}
}),

View file

@ -131,7 +131,7 @@ CloudServer.init = (function(){
*/
this.Minify.setAllowed(CloudServer.Config.minification);
/* Если нужно минимизируем скрипты */
this.Minify.doit();
this.Minify._allowed = this.Minify.doit();
var lAppCache = CloudServer.AppCache;