Authored by xuhongyun

delete shops cdn

... ... @@ -128,7 +128,7 @@ gulp.task("mvc", ["controllers","interfaces","view","framework"]);
gulp.task("controllers", function () {
vfs.src("./apps/**/controllers/*.js").pipe(mapStream(function(file,callback){
file.path=file.path.replace(/apps\\([^/]+)\\controllers\\([^.]+).js/g, function($0,$1,$2){
file.path=file.path.replace(/apps\/([^/]+)\/controllers\/([^.]+).js/g, function($0,$1,$2){
return ["controllers",$1+"."+$2+".js"].join(path.sep);
});
callback(null,file);
... ... @@ -136,7 +136,7 @@ gulp.task("controllers", function () {
});
gulp.task("interfaces", function () {
vfs.src("./apps/**/interfaces/*.js").pipe(mapStream(function(file,callback){
file.path=file.path.replace(/apps\\([^/]+)\\interfaces\\([^.]+).js/g, function($0,$1,$2){
file.path=file.path.replace(/apps\/([^/]+)\/interfaces\/([^.]+).js/g, function($0,$1,$2){
return ["interfaces",$1+"."+$2+".js"].join(path.sep);
});
callback(null,file);
... ...
... ... @@ -140,14 +140,14 @@ Controller.prototype.client=function(res,views,model,clientmodel){
var src="";
if(process.env.NODE_ENV==="production"||process.env.NODE_ENV==="gray"){
src="http://cdn.yoho.cn/"+config.name+"/"+config.version;
html=html.replace(/\/static\/index\.min\.css/g,function($1){
return src+"/index.min.css";
})
}else{
// if(process.env.NODE_ENV==="production"||process.env.NODE_ENV==="gray"){
// src="http://cdn.yoho.cn/"+config.name+"/"+config.version;
// html=html.replace(/\/static\/index\.min\.css/g,function($1){
// return src+"/index.min.css";
// })
// }else{
src="/static";
}
// }
var script=['<script type="text/javascript" src="'+src+'/'+clientmodel+'/libs.js"></script>',
'<script type="text/javascript" src="'+src+'/'+clientmodel+'/'+ views+'.js"></script>'];
res.send(html+ViewModel+script.join(''));
... ...