GithubHelp home page GithubHelp logo

ko-sasaki / ttcli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wimdeblauwe/ttcli

0.0 0.0 0.0 289 KB

CLI to create a Spring Boot with Thymeleaf project

License: Apache License 2.0

JavaScript 1.03% Java 97.54% HTML 1.41% StringTemplate 0.02%

ttcli's Introduction

Taming Thymeleaf CLI

The goal of this project is to provide a command line tool to helps to setup a Spring Boot with Thymeleaf project.

Usage

  1. Download the release from https://github.com/wimdeblauwe/ttcli/releases

  2. Unzip the release

  3. Run ./ttcli help (macOS/Linux) or ttcli.exe help (Windows) to see the options of the tool.

The application is also available via the following package managers:

  • Homebrew (Linux/macOS): brew install wimdeblauwe/homebrew-ttcli/ttcli

  • Chocolatey (Windows): choco install ttcli

Initialize

Run ttcli init to have the tool create a new Spring Boot project with an NPM based live-reload setup.

The tool will ask the following questions:

  1. GroupId: the Maven groupId that should be used for the project.

  2. ArtifactId: the Maven artifactId that should be used for the project.

  3. Name: the project name

  4. Live reload setup: Select how you want to have your live reload setup

  5. Web dependencies: Select from various CSS and/or JavaScript libraries to be added to your project.

The tool will create a new project in a sub-directory of the current directory with the name of the artifactId and apply the following changes:

  • Generate a Spring Boot project

  • Add NPM dependencies and NPM scripts needed to have a live reload setup

  • Add an index.html and layout.html page as a starting point for your Thymeleaf application.

  • Setup Tailwind CSS when selected.

  • Setup Bootstrap when selected.

  • Adds webjars to the Maven dependencies.

  • Adds an application-local.properties with Thymeleaf template caching disabled.

Note
You can choose a different base directory that the tool should use via ttcli --baseDir <otherdir>

Building

Regular JVM build

mvn verify

Native build

Use GraalVM JDK:

sdk use java 22.3.r17-grl

Run native compilation:

mvn -Pnative native:compile

Releasing

Github

An official release is done via a manual action on Github Actions.

Local

Note

You need to configure a GitHub access token. Put it in ~/.jreleaser/config.properties with for example:

JRELEASER_GITHUB_TOKEN=<github-token-value>

Check JReleaser configuration:

mvn -Djreleaser.dry.run -Prelease jreleaser:config

Posting a release from a local environment only when binaries for the current platform are available:

mvn -Prelease jreleaser:release -Djreleaser.select.current.platform

ttcli's People

Contributors

wimdeblauwe avatar github-actions[bot] avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.