mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-28 10:14:13 +00:00
minify return and all-styles-save bugs resolved
This commit is contained in:
parent
fbf58aecb1
commit
d0561a4ce2
2 changed files with 8 additions and 5 deletions
12
minify.js
12
minify.js
|
|
@ -67,6 +67,8 @@ exports.jsScripts=function jsScripts(){
|
|||
|
||||
console.log('reading file ' + CLOUDFUNC_JS+'...');
|
||||
fs.readFile(CLOUDFUNC_JS,fileReaded(CLOUDFUNC_JS,dataReaded_f));
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
/* функция сжимает css-стили
|
||||
|
|
@ -118,7 +120,7 @@ exports.cssStyles=function cssStyles(){
|
|||
* save all minimized css
|
||||
* to one file all.min.css
|
||||
*/
|
||||
(lStyleCssDone && lStyleCssDone)?
|
||||
(lStyleCssDone && lResetCssDone)?
|
||||
fs.writeFile('all.min.css', lAllStyle, fileWrited('all.min.css')):'';
|
||||
|
||||
/* записываем сжатый css файл*/
|
||||
|
|
@ -130,10 +132,8 @@ exports.cssStyles=function cssStyles(){
|
|||
|
||||
console.log('reading file ' + RESET_CSS+'...');
|
||||
fs.readFile(RESET_CSS,fileReaded(RESET_CSS,dataReaded_f));
|
||||
/*
|
||||
var source = "a{font-weight:bold;font-color:red}";
|
||||
var minimized = cleanCSS.process(source);
|
||||
*/
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
/* функция сжимает css-стили
|
||||
|
|
@ -201,6 +201,8 @@ exports.html=function(){
|
|||
|
||||
console.log('reading file ' + INDEX_HTML+'...');
|
||||
fs.readFile(INDEX_HTML,fileReaded(INDEX_HTML,dataReaded_f));
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -131,6 +131,7 @@ CloudServer.Minify={
|
|||
this._allowed.js ||
|
||||
this._allowed.html){
|
||||
var lMinify = require('./minify');
|
||||
console.log(lMinify.jsScripts);
|
||||
this.done.js=this._allowed.js?lMinify.jsScripts():false;
|
||||
this.done.html=this._allowed.js?lMinify.html():false;
|
||||
this.done.css=this._allowed.js?lMinify.cssStyles():false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue