vaadin / client-server-addon-template

Client-server Vaadin add-on template using Lit.
https://vaadin.com/directory
Apache License 2.0
3 stars 5 forks source link
java template-repository typescript vaadin webcomponents

Add-on template for Vaadin with an embedded Lit component

clock-element

You should start from this project, if your add-on will be based on custom Lit HTML element (that you are not planning to publish through npm) and provide Java API for the rest of the application. As an example this project implements a simple clock-element to display current time based on browser.

Add-on architecture

client-server-addon

Alternative add-on templates

If you wish to build and publish an add-on or extension in Vaadin Directory, Vaadin provides the following three template projects:

  1. vaadin/addon-template: Create a composite component. This Java-only template is the easiest when extending Vaadin Java components.
  2. (this repo) vaadin/client-server-addon-template: Build a standalone, client-server TypeScript-Java component. This template provides you with a Lit-based example to start with.
  3. vaadin/npm-addon-template: Wrap a web component from npmjs.com as a Vaadin Java component.

Development instructions

Important Files

Component implementation and API:

For testing and development:

Deployment

These deploy test view at http://localhost:8080

Integration test

To run Integration Tests, execute mvn verify -Pit,production.

Publishing to Vaadin Directory

You should change the organisation.name property in pom.xml to your own name/organization.

    <organization>
        <name>###author###</name>
    </organization>

You can create the zip package needed for Vaadin Directory using

mvn versions:set -DnewVersion=1.0.0 # You cannot publish snapshot versions 
mvn package -Pdirectory,production

The package is created as target/{project-name}-1.0.0.zip

For more information or to upload the package, visit https://vaadin.com/directory/my-components?uploadNewComponent