Skip to content

Latest commit

 

History

History
52 lines (38 loc) · 818 Bytes

env.md

File metadata and controls

52 lines (38 loc) · 818 Bytes

ENV

env variables are placed within App.env.

default Cherry variables

  • SHOW_TOUCHABLES = false
  • SOUND_OFF = false

Override them in your App.start(options)

{options = {env = {"SOUND_OFF": true}}}

usage

if(App.env.SOUND_OFF) then ... end
if(App.env.YOUR_CUSTOM_VAR) then ... end

custom variables, custom env

you should create a src/env.lua and choose the ENV from it.

example:

return {
  DEVELOPMENT = {
    name = 'development',
    -- Cherry overrides
    SOUND_OFF = true,
    -- Custom
    INVINCIBLE = true,
  },
  PRODUCTION = {
    name = 'production'
    -- Custom
    INVINCIBLE = false
  }
}

then require your env to set the chosen one in your start options:

local env = require 'src/env.lua'
App.start({env = env.PRODUCTION})