verhas / jamaleditor

A WebBased Jamal editor with specific features supporting editing Jamal macro files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WebBased Jamal Editor 1.0.0-SNAPSHOT

This project is an experimental project that I started for two reasons:

Play a bit around with Vaadin to see how easy it is to create something simple with a UI but without JavaScript or TypeScript. Although Vaadin cannot be used for heavy-load, public facing applications, it still can be used to prototype applications and to develop applications with limited user base.

image 2023 04 13 17 19 14 998

A web technology based editor running on localhost is definitely implies a limited user base.

The rest of this readme mainly generated by Vaadin startup. I slightly modified it.

Running the application

The project is a standard Maven project. I did not even Jamalified the pom.xml. It is almost as it was generated by the Vaadin startup generator. To run it from the command line, type mvnw (Windows), or ./mvnw (Mac & Linux), then open http://localhost:8080 in your browser.

You can also import the project to your IDE of choice as you would with any Maven project. Read more on how to import Vaadin projects to different IDEs (Eclipse, IntelliJ IDEA, NetBeans, and VS Code).

Configuring the application

The application can be configured creating a jamal-editor.properties file in the directory, where the application was started.

The following properties are supported:

  • autoComplete

    can be used to configure the auto-completion. Auto-completion is enabled only for Jamal files by default, and it focuses on Jamal commands. The completion will suggest the built-in and user defined macros that are available at the point of editing. * In some cases the autocompletion may present too much computation on the application. In this case the auto-completion can be disabled by setting the value of this key to false.

  • theme

    can be used to configure the theme of the editor. This is how the editor starts up. It can also be changed interactively by the user. Changing the themes on the user interface does not change the configuration file.

  • client

    can be used to configure a regular expression that is used to identify the client. If this configuration key is missing only the local host can be used as a client. If this key is defined it is compared against the client IP address as a string.

Deploying to Production

To create a production build, call

Windows:

mvnw clean package -Pproduction

or Mac & Linux:

./mvnw clean package -Pproduction

This will build a JAR file with all the dependencies and front-end resources, ready to be deployed. The file can be found in the target folder after the build completes.

Once the JAR file is built, you can run it using

java -jar target/jamal-editor-1.0.0-SNAPSHOT.jar

views of your application.

  • views folder in frontend/ contains the client-side JavaScript views of your application.

  • themes folder in frontend/ contains the custom CSS styles.

About

A WebBased Jamal editor with specific features supporting editing Jamal macro files

License:Apache License 2.0


Languages

Language:JavaScript 85.7%Language:Java 13.2%Language:HTML 0.5%Language:CSS 0.4%Language:TypeScript 0.1%