Skip to content

Instantly share code, notes, and snippets.

@arjan
Last active December 10, 2015 14:58
Show Gist options
  • Save arjan/4450884 to your computer and use it in GitHub Desktop.
Save arjan/4450884 to your computer and use it in GitHub Desktop.
rebarizing zotonic
Make each module and each site an Erlang (library) app.
This means that each module should be structured like this:
├── dispatch
├── ebin
├── lib
│   ├── css
│   ├── images
├── src
│   ├── actions
│   ├── controllers
│   ├── filters
│   ├── scomps
│   ├── services
│   ├── support
│   └── validators
├── templates
│   ├── phone
│   ├── tablet
│   ├── tests
│   └── text
├── tests
└── translations
└── template
This way, modules and sites compile with the rebar {subdirs} feature.
@kaos
Copy link

kaos commented Jan 5, 2013

Nice!

+1 for letting the modules do it with the help of calls to the core functions. This way, the paths need not be fixed indefinetly, since you can pass in a starting point and other options, per module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment