mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
changes related with new api in css-b64-images library
This commit is contained in:
parent
949e0ea806
commit
8d35f24d35
1 changed files with 11 additions and 9 deletions
|
|
@ -96,7 +96,7 @@ exports.cssStyles=function cssStyles(pImgConvertToBase64_b){
|
|||
try{
|
||||
cleanCSS = require('clean-css');
|
||||
}catch(error){
|
||||
console.log('can\'n load clean-css \n' +
|
||||
console.log('can\'n load clean-css \n' +
|
||||
'to use css-minification you need to install clean-css \n' +
|
||||
'npm install clean-css\n' +
|
||||
'https://github.com/GoalSmashers/clean-css');
|
||||
|
|
@ -131,9 +131,9 @@ exports.cssStyles=function cssStyles(pImgConvertToBase64_b){
|
|||
* save all minimized css
|
||||
* to one file all.min.css
|
||||
*/
|
||||
/* если включена конвертация картинок в base64
|
||||
* вызываем её
|
||||
*/
|
||||
/* если включена конвертация картинок в base64
|
||||
* вызываем её
|
||||
*/
|
||||
if(lStyleCssDone && lResetCssDone)
|
||||
if(pImgConvertToBase64_b)
|
||||
base64_images(lAllStyle);
|
||||
|
|
@ -235,12 +235,14 @@ function base64_images(pFileContent_s){
|
|||
'https://github.com/GoalSmashers/clean-css');
|
||||
return false;
|
||||
}
|
||||
|
||||
b64img('all.min.css', '.', function(err, css){
|
||||
//if(err) console.error('Error:', err);
|
||||
//console.log('**'+css);
|
||||
/*
|
||||
b64img('all.min.css', '.', function(err, css){
|
||||
fs.writeFile('all.min.css', css, fileWrited('all.min.css'));
|
||||
}, pFileContent_s);
|
||||
*/
|
||||
b64img.fromString(pFileContent_s, '.','', function(err, css){
|
||||
fs.writeFile('all.min.css', css, fileWrited('all.min.css'));
|
||||
}, pFileContent_s);
|
||||
});
|
||||
}
|
||||
|
||||
/* Функция создаёт асинхроную версию
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue