core

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

License

License

GroupId

GroupId

com.ainrif.acorn
ArtifactId

ArtifactId

core
Last Version

Last Version

0.2.0
Release Date

Release Date

Type

Type

pom.sha512
Description

Description

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

Project URL

https://github.com/ainrif/acorn
Project Organization

Project Organization

Ainrif
Source Code Management

Source Code Management

https://github.com/ainrif/acorn

Download core

Dependencies

runtime (3)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.7.30
org.codehaus.groovy : groovy jar
org.codehaus.groovy : groovy-templates jar

Project Modules

There are no modules declared in this project.

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

Versions

Version
0.2.0
0.1.0