Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

0.26.0 Itachi

Compare
Choose a tag to compare
@SRNV SRNV released this 27 Nov 18:16
· 297 commits to master since this release

New Project (4)

Releasing Ogone 0.26.0 called "Itachi"

which is a big internal refactor that started like 2-3 months ago, with a better typescript support, more robustness, and the introduction of modifiers. This refactor was required to make Ogone more readable and more maintainable

Changes

  • tsx transpilation allowing a better props type-checking
  • the component is no more destructured in dynamic attributes/props/flags, this means instead of this <input --bind="property" /> you will need to write <input --bind="this.property" />, same for all flags and props.
  • simpler and more robust regExp system, using the functions read | getDeepTranslation.
  • removing too huge and large files, started to get unmaintainable.
  • def | default | case xxx | before-each are now considered as modifiers
    • all modifiers are based on there indentations
    • the components using the declare modifier will be transpiled to tsx and type checked
      • these will use Proxies for the reactivity
    • using def and declare is no more allowed
    • the before-each modifier will no more support the reflection syntax, instead use the compute modifier:
<proto>
  declare:
    public reflect() {
      return 'this is a reflection updated every there\'s a change';
    }
  compute:
     this.a => this.reflect()
</proto>
  • Obvious is now renamed Style

Additional Features

  • the compute modifier
  • add methods to the component, with the declare modifier
  • the --for flag is now following this syntax: --for="item of array" | --for="(item, index) of array", you can now destructure the item element doing something like this:
<template>
  <div --for="{ name, id } of this.users">${id} Hello ${name}</div>
</template>
<proto>
  declare:
     public users: { name: string, id: number }[] = [...]
</proto>