mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
fixed bug with minifying, if file do not minimized so allowed set to none
This commit is contained in:
parent
dc35575027
commit
b2baf5ec0c
3 changed files with 10 additions and 3 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}),
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue