aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 098ad6389df44eb0620d3e674ac9f8ff26480f6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Templater
=========

Skeletor: project bootstrapping made easy! A boilerplater of useful utilities
for your software project.

Tired of tediously creating the basic skeleton for your projects? What if you
forget to add a LICENSE or some other important file?

## Instalation

Simply clone it and add to your `$PATH`:

    git clone https://git.fluxo.info/templater

You can also verify the latest commit's OpenPGP signature:

    /usr/bin/git -C templater verify-commit HEAD

Note that `/usr/bin/git` is called to avoid any other `git` wrappers or aliases
you might have available on your shell.

## Example: Drupal 8 Development

Create the project (requires [KVMX](https://kvmx.fluxo.info)):

    templater drupal8 basic gpl conduct git puppet kvmx drupal8 && cd drupal8

Basic puppet configuration:

    puppet/bin/submodules
    cp puppet/config/node/box.example.org.yaml puppet/config/node/drupal8.example.org.yaml
    vim puppet/config/node/drupal8.example.org.yaml # set nodo::role to 'dev::drupal8'

Edit your drupal config

    vim settings.php # database config

Set kvmx parameters:

    kvmx edit # basebox provision_rsync provision_command run_spice_client port_mapping shared_folder_mountpoint

Provision the virtual machine:

    kvmx up && kvmx provision

Install the drupal instance:

    echo '( cd /srv/kvmx && make drush        )' | kvmx ssh
    echo '( cd /srv/kvmx && make site_install )' | kvmx ssh

### Writing modules

Modules can be written using any programming language. It will be called from the project
toplevel folder with templater's `share` folder as the first parameter.

Module layout:

- description: states in natural language what the modules does
- setup: states in programing language what the module does (the actual script)
- files (optional)

Example: when you call `templater myproject basic`, templater finds a script
at `$path_to_templater_install/share/basic/setup` and execs it like this:

    cd myproject && share/basic/setup $path_to_templater_install/share/templater