mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
fix(Grunt): also remove \r chars when joining files
This commit is contained in:
parent
ef334d0070
commit
0893e83c92
1 changed files with 3 additions and 3 deletions
|
|
@ -65,7 +65,7 @@ module.exports = {
|
|||
var css = fs.readFileSync(file).toString();
|
||||
if(minify){
|
||||
css = css
|
||||
.replace(/\n/g, '')
|
||||
.replace(/\r?\n/g, '')
|
||||
.replace(/\/\*.*?\*\//g, '')
|
||||
.replace(/:\s+/g, ':')
|
||||
.replace(/\s*\{\s*/g, '{')
|
||||
|
|
@ -73,11 +73,11 @@ module.exports = {
|
|||
.replace(/\s*\,\s*/g, ',')
|
||||
.replace(/\s*\;\s*/g, ';');
|
||||
}
|
||||
//espace for js
|
||||
//escape for js
|
||||
css = css
|
||||
.replace(/\\/g, '\\\\')
|
||||
.replace(/'/g, "\\'")
|
||||
.replace(/\n/g, '\\n');
|
||||
.replace(/\r?\n/g, '\\n');
|
||||
return "angular.element(document).find('head').append('<style type=\"text/css\">" + css + "</style>');";
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue