Commit e6271c96 by 王昆

gsb

parent 6c5db47a
...@@ -40,11 +40,14 @@ module.exports = function (app) { ...@@ -40,11 +40,14 @@ module.exports = function (app) {
app.get('/vue/comp/:cname',function(req,res){ app.get('/vue/comp/:cname',function(req,res){
var componentName=req.params.cname; var componentName=req.params.cname;
buildComponent(componentName).then(function(r){ buildComponent(componentName).then(function(r){
let platform = os.platform();
console.log(platform, '----------------');
// windows // windows
let _r = r.replace(/\n\r/g,""); if(platform.startsWith('win')) {
// linux res.end(r.replace(/\n\r/g,""));
_r = _r.replace(/\n/g,""); } else {
res.end(_r,""); res.end(r.replace(/\n/g,""));
}
}); });
}); });
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment