Authored by dongjunjie

11

... ... @@ -79,8 +79,7 @@ if(process.env.NODE_ENV!=='development'){
}
/*环境配置*/
if(process.env.NODE_ENV){
if(process.env.NODE_ENV!="coding"){
apiCofig.MVC={
Interfacer:path.join(__dirname,"interfaces/0.js").replace(/0/g,'*'),
Controller:path.join(__dirname,"controllers/0.js").replace(/0/g,'*'),
... ...
... ... @@ -139,10 +139,9 @@ Controller.prototype.client=function(res,views,model,clientmodel){
ViewModel="<script>var ViewModel="+JSON.stringify(model)+";</script>";
var src="";
if(process.env.NODE_ENV=="production"){
console.log("NODE_ENV",process.env.NODE_ENV);
if(process.env.NODE_ENV==="production"){
src="http://cdn.yoho.cn/yohobuy-shops-fe/"+config.version;
html=html.replace(/\/static\/index\.min\.css/g,function($1){
html.replace(/\/static\/index\.min\.css/g,function($1){
return src+$1;
})
}
... ...
{"name":"yo","version":"4.3.0","description":"Construction of the presentation layer solution is based on express, handlebars","main":"app.js","scripts":{"js":"webpack --config webpack.config.dev.js"},"dependencies":{"art-template":"^3.0.3","async":"^2.0.0-rc.3","body-parser":"^1.15.0","connect-multiparty":"^2.0.0","connect-redis":"^3.0.2","cookie-parser":"^1.4.1","express":"^4.13.4","express-session":"^1.13.0","lodash":"^4.11.1","md5":"^2.1.0","mkdirp":"^0.5.1","request":"^2.72.0","winston":"^2.2.0","glob":"^7.0.3"}}
\ No newline at end of file
{"name":"yo","version":"4.3.0","description":"Construction of the presentation layer solution is based on express, handlebars","main":"app.js","scripts":{"code":"set NODE_ENV=coding&& gulp start","server":"set NODE_ENV=server&& gulp start"},"dependencies":{"art-template":"^3.0.3","async":"^2.0.0-rc.3","body-parser":"^1.15.0","connect-multiparty":"^2.0.0","connect-redis":"^3.0.2","cookie-parser":"^1.4.1","express":"^4.13.4","express-session":"^1.13.0","lodash":"^4.11.1","md5":"^2.1.0","mkdirp":"^0.5.1","request":"^2.72.0","winston":"^2.2.0","glob":"^7.0.3"}}
\ No newline at end of file
... ...