Extending Norska
It's better to climb together
Norska can be extended and customized to multiply creative possibilities.
Using an add-on
Adding an add-on to Norska is extremely simple: just pass it as a parameter before initialization.
New directives will be accessible via the prefix defined in the add-on configuration file (generally the name of the add-on itself) and magic properties will be accessible directly.
Creating an add-on
An add-on consists of various files for directives and magic properties, plus a file used to index all imports and configure parameters.
namespace
The namespace between Norska's prefix and the name of your directives
directives
An object containing all the directives of your add-on
magics
An object containing all the magic properties of your add-on
Let's take a closer look at the code in our example, how does it works ?
myAddon.ts
something.ts
stuff.ts
Last updated