clawplach / project-templates

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Project Templates

What is the goal of this repository?

The goal of this repository is to classify and enumerate methods of (re)generating project archetypes.

Directory Templates

There are two different was to describe a project's directory schema:

  1. 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.
  1. 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

Implementations

name platform permissions
j2 all yes
Apache Maven Archetype Plugin all yes
Buildout all ?
Yeoman all (node.js) ?

Text File Templates

Implementations

name platform
Velocity all
FreeMarker all
stringtemplate all

About

License:The Unlicense