mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 17:05:17 +00:00
removed properties done from Minify object
This commit is contained in:
parent
7e3586bdc3
commit
56396ecf12
3 changed files with 21 additions and 22 deletions
|
|
@ -65,7 +65,6 @@ exports.Cache={
|
|||
*/
|
||||
exports.Minify={
|
||||
/* pathes to directories */
|
||||
CSSDIR :'./css',
|
||||
INDEX :'index.html',
|
||||
/* приватный переключатель минимизации */
|
||||
_allowed :{css:true,js:true,html:true, img: true},
|
||||
|
|
@ -149,31 +148,31 @@ exports.Minify={
|
|||
};
|
||||
|
||||
var lOptimizeParams;
|
||||
|
||||
this.done.js=this._allowed.js?
|
||||
|
||||
if (this._allowed.js) {
|
||||
lOptimizeParams=[{
|
||||
'client.js': lPostProcessing_f},
|
||||
'lib/cloudfunc.js',
|
||||
'lib/client/keyBinding.js']
|
||||
:false;
|
||||
|
||||
this.done.html=this._allowed.html?
|
||||
lOptimizeParams[lOptimizeParams.length]=this.INDEX
|
||||
:false;
|
||||
|
||||
if (lOptimizeParams)
|
||||
lMinify.optimize(lOptimizeParams, true);
|
||||
'lib/client/keyBinding.js'];
|
||||
}
|
||||
|
||||
this.done.css=this._allowed.css?
|
||||
lMinify.cssStyles([this.CSSDIR + '/style.css',
|
||||
this.CSSDIR + '/reset.css'],
|
||||
this._allowed.img):false;
|
||||
if (this._allowed.html)
|
||||
lOptimizeParams[lOptimizeParams.length] = this.INDEX;
|
||||
|
||||
if (this._allowed.css) {
|
||||
lOptimizeParams[lOptimizeParams.length] = [{
|
||||
'./css/style.css' : this._allowed.img }];
|
||||
|
||||
lOptimizeParams[lOptimizeParams.length] = [{
|
||||
'./css/reset.css': this._allowed.img}];
|
||||
}
|
||||
|
||||
if (lOptimizeParams)
|
||||
lMinify.optimize(lOptimizeParams, true);
|
||||
|
||||
this.Cache = lMinify.Cache;
|
||||
}
|
||||
}),
|
||||
/* свойство показывающее случилась ли ошибка*/
|
||||
done:{js: false,css: false, html:false},
|
||||
|
||||
/* minification folder name */
|
||||
MinFolder :'',
|
||||
|
|
|
|||
2
node_modules/minify
generated
vendored
2
node_modules/minify
generated
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit de395fc27627b91b73507590204968e70089141c
|
||||
Subproject commit a905c0aa5b90dbd21126c9830e0a521cd49c7f3c
|
||||
|
|
@ -400,7 +400,7 @@ CloudServer._controller=function(pReq, pRes)
|
|||
* меняем название html-файла и
|
||||
* загружаем сжатый html-файл в дальнейшем
|
||||
*/
|
||||
CloudServer.INDEX=(CloudServer.Minify.done.html?
|
||||
CloudServer.INDEX=(CloudServer.Minify._allow.html?
|
||||
'.' + CloudServer.Minify.MinFolder + 'index.min.html'
|
||||
:CloudServer.INDEX);
|
||||
/*
|
||||
|
|
@ -525,12 +525,12 @@ CloudServer._readDir=function (pError, pFiles)
|
|||
* we include minified version of
|
||||
* clien.js to index.html
|
||||
*/
|
||||
lIndex = CloudServer.Minify.done.css?
|
||||
lIndex = CloudServer.Minify._allow.css?
|
||||
lIndex.replace('<link rel=stylesheet href="/css/reset.css">','')
|
||||
.replace('/css/style.css',CloudServer.Minify.MinFolder + 'all.min.css')
|
||||
:lIndex;
|
||||
|
||||
lIndex = CloudServer.Minify.done.js?lIndex.replace('client.js',
|
||||
lIndex = CloudServer.Minify._allow.js?lIndex.replace('client.js',
|
||||
CloudServer.Minify.MinFolder +
|
||||
'client.min.js')
|
||||
:lIndex;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue