Skip to content

v0.0.9

Latest
Compare
Choose a tag to compare
@rmorse rmorse released this 07 Aug 19:39
a782eb5

What's new:

  • Greatly improved control variables
    • Now supports any order of parameters in statements, eg:
      'yes' === myControlVar as well as myControlVar === 'no'
    • Ability to combine template vars in statements, eg:
      myControlTemplateVar !== anotherControlTemplateVar
    • Support for ternary expressions and nested ternary expressions such as:
      const className = 'input--type-' + ( multiple ? 'multiple' : 'single' )
      Works for variable assignment in the component block statement as well as when used directly in JSX output:
      <>{ 'Is type: ' + ( multiple ? 'multiple' : 'single' ) }</>
    • Added all the above logic for for statements in JSX expressions, eg:
      { myTemplateVar === anotherTemplateVar && 'Some output' }
  • Reworked language files to be more readable, eg, instead of ||%1|| now use [%_variable_]
    • Notice this change is not backwards compatible and requires remaking your language files (if using custom language files)
    • Added custom variables to languages (check the PHP language file) - these can be used like:
      [%myVariableName]