Skip to main content

Prerequisites

To develop a custom block for Tripetto you need programming skills. TypeScript is required when building custom blocks, because we rely heavily on the use of decorators. Also, you need a bundler like webpack to bundle all the block assets.

info

Tripetto uses decorators for building custom blocks. Therefore, you should always use TypeScript and enable the experimentalDecorators feature of it.

Caution when using Babel

If you use Babel in your project, you need an additional build step for the builder part of a custom block. That's because the implementation of decorators slightly differs between TypeScript and Babel. The code that Babel produces can therefore not run properly out-of-the-box. The solution is simple: If you are using Babel, add an additional build step that compiles the builder part of a block from TypeScript to JavaScript ES5 (not ES6!) code first (using the TypeScript compiler). This assures the decorators are compiled the right way.