Authored by xuhongyun

delete portal cdn

... ... @@ -125,10 +125,9 @@ gulp.task('server', function () {
* 服务器打包
**************************************************************/
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 +135,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);
... ...
... ... @@ -112,7 +112,7 @@ if(process.env.NODE_ENV==="gray"){
}
/*线上环境*/
if(process.env.NODE_ENV==="production"){
apiCofig.EnvConst.domain="http://172.31.20.7:8088/platform";
apiCofig.EnvConst.domain="http://127.0.0.1:8088/platform";
apiCofig.EnvConst.yohoSearch="http://search.yohoops.org/yohosearch";
}
module.exports = require('./libs/App')(apiCofig);
\ No newline at end of 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(''));
... ...
... ... @@ -112,7 +112,7 @@ if(process.env.NODE_ENV==="gray"){
}
/*线上环境*/
if(process.env.NODE_ENV==="production"){
apiCofig.EnvConst.domain="http://172.31.20.7:8088/platform";
apiCofig.EnvConst.domain="http://127.0.0.1:8088/platform";
apiCofig.EnvConst.yohoSearch="http://search.yohoops.org/yohosearch";
}
module.exports = require('./libs/App')(apiCofig);
\ No newline at end of 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(''));
... ...