We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

What's the best way to structure a Git repo for a new add-on?

Development and Programming

siffring's avatar
siffring
147 posts
15 years ago
siffring's avatar siffring

Add-on developers,

How do you structure your directories and Git repo when developing an add-on?

I’m attempting my first EE add-on. I’m trying to do it the right way and put it in a Git repository. Most ee_addons in GitHub have a similar structure:

README.txt
extensions/
  ext_project.php
modules/
  project/
    mod.project.php
language/
  english/
    lang.project.php

The obvious solution is to init your git repo in EE’s system directory and only git add your add-on’s files. But, I see a couple problems with this.

1) The README.txt file will live in the system directory of your EE build system. What happens if you’re working on muliple add-ons that each have a README.txt? Do you have separate EE builds for each add on?

2) What if your add-on needs a theme file that lives outside the system directory?

Another option would be to just develop the add on in your EE build system. Then when you’re ready to commit, copy the files over to a separate directory that is only used for committing to git. This feels a little clunky.

I’m sure there is a best practice here, but haven’t seen it documented anywhere.

Appreciate any thoughts!

       
Brandon Kelly's avatar
Brandon Kelly
257 posts
15 years ago
Brandon Kelly's avatar Brandon Kelly

I put all of my git-based projects in /Users/brandon/git/, structured identically to how I want to release it. Then I create symlinks throughout the EE install(s) to the appropriate files.

       
siffring's avatar
siffring
147 posts
15 years ago
siffring's avatar siffring

But of course! Thanks Brandon.

Does that setup work ok for you? Have you developed many add-ons? (just kidding)

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.