The goal of this repository is to classify and enumerate methods of (re)generating project archetypes.
There are two different was to describe a project's directory schema:
- Declare the schema in some DSL and then use a tool to generate the directories.
# TODO: Add an example where directories, files, and attributes are declared in some prescribed manner that other tools parse and assemble.
- Create an archive of an example of the directory structure.
#!/bin/sh -eu
echo "What do you want to call the project template?"
read name
mkdir -p ${name}/src/{main,test,script,doc}
touch ${name}/README.md ${name}/src/script/bootstrap.sh
chmod u+x ${name}/src/script/bootstrap.sh
tar -c -z -f ${name}.tar.gz ${name}
The ${name}.tar.gz
package can now be distributed by many means (HTTPS,FTPS,SCP,…).
… and then later expanded:
#!/bin/sh -eu
echo "Enter the project template file URL:"
read url && wget ${url} | tar -x -z
name | platform | permissions |
---|---|---|
j2 | all | yes |
Apache Maven Archetype Plugin | all | yes |
Buildout | all | ? |
Yeoman | all (node.js) | ? |
name | platform |
---|---|
Velocity | all |
FreeMarker | all |
stringtemplate | all |