core

The Acorn lets you create archetypes for any kind of project or file structures.

Лицензия

Лицензия

Группа

Группа

com.ainrif.acorn
Идентификатор

Идентификатор

core
Последняя версия

Последняя версия

0.2.0
Дата

Дата

Тип

Тип

pom.sha512
Описание

Описание

core
The Acorn lets you create archetypes for any kind of project or file structures.
Ссылка на сайт

Ссылка на сайт

https://github.com/ainrif/acorn
Организация-разработчик

Организация-разработчик

Ainrif
Система контроля версий

Система контроля версий

https://github.com/ainrif/acorn

Скачать core

Имя Файла Размер
core-0.2.0.pom
core-0.2.0-sources.jar 1 KB
core-0.2.0-javadoc.jar 261 bytes
Обзор

Зависимости

runtime (3)

Идентификатор библиотеки Тип Версия
org.slf4j : slf4j-api jar 1.7.30
org.codehaus.groovy : groovy jar
org.codehaus.groovy : groovy-templates jar

Модули Проекта

Данный проект не имеет модулей.

Acorn

Acorn is a simple file tree template engine inspired by lazybones project.

The Acorn lets you create archetypes for any kind of project or file structures.

Getting Started

The Acorn has two version: Groovy (Java) library and CLI for it.

Get library from Maven Central Repo

  • group: com.ainrif.acorn

  • artifact: core

  • version: Artifact Version

CLI App can be downloaded from GitHub Release page

Features

Content parametrisation

Replace placeholders with given data

simple.txt.tmpl
Dear ${user}. You have ${count} thing${count > 1 ? 's' : ''} in your cart.
Total price is \$${totalPrice}

Template scripting

You can use groovy for scripting inside file templates because they are GStringTemplateEngine

advanced.txt.tmpl
Dear <%= user%>. You have <% out << count %> thing<%
 if (count > 1) {
    out << 's'
 }
 %> in your cart.
Total price is \$${totalPrice}

File name parametrisation

Placeholders can be used in plain file and template names

./src
└── ${nameVar}-file.txt
└── ${nameVar}.txt.tmpl

Generate folder path with placeholders

You can generate nested hierarchy by templating folder names

./src
├── ${emptyValue}
│   └── file-in-root.txt
├── ${folderVar}
│   └── nested-file.txt
└── ${nameVar}-file.txt

params: [nameVar: 'named', folderVar: 'one/two/three', emptyValue: '']

./dest
├── file-in-root.txt
├── named-file.txt
└── one
    └── two
        └── three
            └── nested-file.txt

Версии библиотеки

Версия
0.2.0
0.1.0