Configuration - globules-io/OGX.JS GitHub Wiki

OGX.JS works with a JSON configuration file app.json that is located in the www folder of your project. This file is used to define the Routing system, Stages, Views, Controllers but also default configuration for Windows and Popups, and Templates, sounds, images, fonts, json, ose, oml files to be preloaded.

Out of fonts, images, json and sounds, only json and sounds are retrieve-able through the core (or you app). Images and fonts are preload to be put in the cache, so templates with images and fonts render directly properly. Check out this page to know more about using sounds or json.

Its default structure is as follow:

 {
      "routing":{},          
      "popups":{
           "width":300,
           "height":400,
           "anim":"fade"               
       },
       "windows":{
            "head":"back",
            "width":"100%",
            "icons":["/img/logo.svg"],
            "fade":false,
            "scroll":false
        },
        "preload":{
             "/html":[],  
             "/img":[],  
             "/snd":[], 
             "/oml":[], 
             "/ose":[],
             "/json":[],
        },
        "splash": {
           "enabled" : false
        },
        "scope":["public"] 
 }

Note that the windows and popups attributes define the default config for every popups and windows.

You can also list the files inside the www/img folder as a JSON array if you are using the CLI by doing

 ogx images

and also list the files inside the www/json folder as a JSON array if you are using the CLI by doing

 ogx jsons

to learn to how use the CLI to fill your config, head over to the CLI wiki