extensions/
folder of any project.
extensions/
folder in the project folder and looks for .css
and .js
files. This folder is also served, similarly to static/
. If it finds any valid files in extensions/
, it shares the list with clients and tells them to dynamically import these files during runtime.
Extensions and custom templates are currently synonyms, but this might change in order to accommodate other extension capabilities.
evaluatedFields
, which contain the current values of the editable fields. Injected dependencies are fully typed, making development easier.
Rollup’s external feature, invoked via Vite, allows for extensions to be compiled without dependencies and link those during runtime. Therefore, extensions aren’t bundled to be standalone, but rather to work as a piece of a puzzle.
corebutton
defines how Button components are rendered.
Framework component templates are purely front-end. They are Vue 3 templates that extend the Vue specification via a custom option, writer
. This custom option defines all the Framework-specific behaviour of the component. For example, its fields
property establishes which fields will be editable via the Builder.
text
.
Clone the Framework Repository
Set Up the Development Environment
ui
folder. With Node and npm
installed on your system, run npm install
to install dependencies. Then,
start the server with support for custom component templates using npm run custom.dev
.Start the Back-End Server
npm run custom.dev
starts a front-end server, which requires a
back-end to function fully. Start Framework via command line, specifying the
option --port 5000
, to provide a back-end on that port. It’s recommended
to create a new app for testing the template you’re developing. sh writer create customtester writer edit customtester --port 5000
Access Framework and Test Custom Component
http://localhost:5174
. In the Builder’s Toolkit, you should see the
sample component, Balloon Message. Add it to your tester application.ui/src/components/core
folder.ui/src/components/custom
and open the Vue single-file components, i.e. the
.vue
files. These files contain comments that will help you get started. Try editing
the provided templates, you should see changes reflected.
You can get started by duplicating one of these examples. Make sure you add the new template to the entrypoint, as discussed below.
ui/src/components/custom/index.ts
to define which templates you wish to export and under which identifiers.
npm run custom.build
into src/ui
, this will generate the output .js
and .css
files into ./custom_components_dist
.
./custom_components_dist
and pack them in a folder such as my_custom_bubbles
. The folder containing the generated files, e.g. my_custom_bubbles
, can now be placed in the extensions/
folder of any Framework project. It’ll be automatically detected during server startup.
custom.check
command is optional, but it’s recommended to run it before building the custom components. It checks for common issues in the custom components, such as invalid key declaration, …