examples/simple-example/web-server/public/js/lib/build/build.js
function(data){
    if(!data || !data.sys) {
      return;
    }
    pinus.data = pinus.data || {};
    var dict = data.sys.dict;
    var protos = data.sys.protos;

    //Init compress dict
    if(dict){
      pinus.data.dict = dict;
      pinus.data.abbrs = {};

      for(var route in dict){
        pinus.data.abbrs[dict[route]] = route;
      }
    }

    //Init protobuf protos
    if(protos){
      pinus.data.protos = {
        server : protos.server || {},
        client : protos.client || {}
      };
      if(!!protobuf){
        protobuf.init({encoderProtos: protos.client, decoderProtos: protos.server});
      }
    }
  }
function(data){
    if(!data || !data.sys) {
      return;
    }
    pinus.data = pinus.data || {};
    var dict = data.sys.dict;
    var protos = data.sys.protos;

    //Init compress dict
    if(dict){
      pinus.data.dict = dict;
      pinus.data.abbrs = {};

      for(var route in dict){
        pinus.data.abbrs[dict[route]] = route;
      }
    }

    //Init protobuf protos
    if(protos){
      pinus.data.protos = {
        server : protos.server || {},
        client : protos.client || {}
      };
      if(!!protobuf){
        protobuf.init({encoderProtos: protos.client, decoderProtos: protos.server});
      }
    }
  }
function ( data ) { if ( ! data || ! data . sys ) { return ; } pinus . data = pinus . data || { } ; var dict = data . sys . dict ; var protos = data . sys . protos ; //Init compress dict if ( dict ) { pinus . data . dict = dict ; pinus . data . abbrs = { } ; for ( var route in dict ) { pinus . data . abbrs [ dict [ route ] ] = route ; } } //Init protobuf protos if ( protos ) { pinus . data . protos = { server : protos . server || { } , client : protos . client || { } } ; if ( ! ! protobuf ) { protobuf . init ( { encoderProtos : protos . client , decoderProtos : protos . server } ) ; } } }
Initilize data used in pinus client
Initilize data used in pinus client