Skip to content

Releases: MCDevKit/json-templating-engine

1.4.0

05 May 19:15
Compare
Choose a tag to compare

Added:

  • Implementation of add operator between objects (merges two objects, where in a + b, a is the higher priority) and arrays (joins two arrays)
  • Templating mcfunction files (putting #{expression} anywhere in mcfunction will replace it with evaluated expression)
  • --minify option
  • Improved error reporting when loading scope

Functions added:

  • sort
  • range
  • lastIndexOf

Fixed:

  • Lambda scope stack
  • Casting string to a number or a boolean
  • Escaping backslashes at the end of the string
  • Field and Reference grammar merged, so this expression works now 'stage_' + (stage == 3 ? 'full' : stage)

1.3.0

30 Mar 06:17
Compare
Choose a tag to compare

Added:

  • Null coalescing operator (value ?? 'return value when value is null')
  • Null-conditional operators (object?.valueThatMightNotBeDefined)
  • Instance functions (array.count() instead of count(array))
  • Ability to override module scope in templates
  • Templating inside $extend field
  • Iteration data in $copy field
  • Current scope stack (in nested loops, you will be able to access data from outer loop)
  • --include and --exclude option (for excluding or including files based on glob pattern)
  • --remove-src flag (after compiling template files, will remove them)
  • Ability to use null values, when calling functions
  • Ability to use template string as predicate value (e.g. {"?predicate": "{{array}}"})

Functions added:

  • bitshiftLeft
  • bitshiftRight
  • bitwiseAnd
  • bitwiseNot
  • bitwiseOr
  • bitwiseXor
  • chars
  • encode
  • getLatestBPFile
  • getLatestRPFile
  • indexOf
  • listLatestBPFiles
  • listLatestRPFiles
  • load
  • max
  • min
  • sublist

Fixed:

  • Range with negative start
  • Equations inside parentheses
  • Order of field grammar
  • Boolean literal value
  • Copy iteration

1.0.12

04 Oct 12:50
Compare
Choose a tag to compare

Initial open source release